Due Date : 22/01/2020


Practice - Assessment Test

  1. Open Your R-Studio :)
  2. Create a new “R Project”
  3. Create a new “R Script” file and save it
  4. Learn your Working Directory
  5. Check files, under your working directory
  6. Create a vector with four numeric elements using seq()
  7. Assign it to a new variable (vec1)
  8. Check the length of vector
  9. Calculate the mean of vector
  10. Coerce your numeric vector to characteristic vector
  11. Check the class of your new vetcor
  12. Print the second element of your vector
  13. Change the second element as “TRUE”, assign it as vec1

  1. Create a new vector with 12 elements using runif()
  2. Assign it as vec2
  3. Create a new matrix, 3 rows, 4 columns using this vector
  4. Assign this matrix as a new variable
  5. Check dimensions of this matrix
  6. Create a new matrix (4x4) with using vec1 and vec2
  7. Explain what is happening (bycol or byrow)
  8. Create the same matrix again, this time with byrow=T
  9. Assign it as mat1
  10. Create a new array with 4 rows, 4 columns and 2 layers using mat1
  11. Assign it as arr1
  12. Select 2nd row, 3rd column and change it with NA for each layers

  1. Go to main web page of our course
  2. Copy this data : Istanbul_Cekmekoy_Omerli_26072017-29072017_15min - txt
  3. Paste your “Download” folder
  4. Turn back to R Studio
  5. Read the station data, be careful about file path, header and seperator
  6. Assign it as sta_data
  7. Check the structure and attributes of sta_data
  8. Print and plot precipiptation of sta_data
  9. Write a condition; if total precipitation is higher than zero than print “Weather was rainy”
  10. Install & load “ncdf4”, “RNetCDF” and “ggplot2” packages