Due Date : 22/01/2020
Practice - Assessment Test
- Open Your R-Studio :)
- Create a new “R Project”
- Create a new “R Script” file and save it
- Learn your Working Directory
- Check files, under your working directory
- Create a vector with four numeric elements using seq()
- Assign it to a new variable (vec1)
- Check the length of vector
- Calculate the mean of vector
- Coerce your numeric vector to characteristic vector
- Check the class of your new vetcor
- Print the second element of your vector
- Change the second element as “TRUE”, assign it as vec1
- Create a new vector with 12 elements using runif()
- Assign it as vec2
- Create a new matrix, 3 rows, 4 columns using this vector
- Assign this matrix as a new variable
- Check dimensions of this matrix
- Create a new matrix (4x4) with using vec1 and vec2
- Explain what is happening (bycol or byrow)
- Create the same matrix again, this time with byrow=T
- Assign it as mat1
- Create a new array with 4 rows, 4 columns and 2 layers using mat1
- Assign it as arr1
- Select 2nd row, 3rd column and change it with NA for each layers
- Go to main web page of our course
- Copy this data : Istanbul_Cekmekoy_Omerli_26072017-29072017_15min - txt
- Paste your “Download” folder
- Turn back to R Studio
- Read the station data, be careful about file path, header and seperator
- Assign it as sta_data
- Check the structure and attributes of sta_data
- Print and plot precipiptation of sta_data
- Write a condition; if total precipitation is higher than zero than print “Weather was rainy”
- Install & load “ncdf4”, “RNetCDF” and “ggplot2” packages