Data statistics and visualization

Use the following function, which takes as arguments your name and surname, to determine the identifier of the dataset you will analyze. Please, when specifying your name and surname, remove or convert any special character (e.g., umlaut) appropriately.

seldataset <- function(name, surname) {
  

  ind <- seq(1,26)
  if ( (nchar(name) %% 3) == 0 ) {
    
    ind <- seq(20:26)

  } else if ( (nchar(name) %% 2) == 0 ) {
    
    surname <- paste0(name, surname)
    
  }
  chars <- letters[ind]
  
  surname <- tolower(surname)
  dataset <- min(13, max(1, sum(unlist(sapply(chars, grep, x=surname)))))
  dataset <- paste0("D", dataset)
  
  return(dataset)
  
}
seldataset(name = "Francesca", surname = "Finotello") 
## [1] "D2"

Download the assigned RData dataset (e.g., D2_data.RData) from https://github.com/FFinotello/Rcourse/tree/master/Data/Day7.

Load it in R and compute the following statistics, rounded at 2 digits resolution:

Save the results, together with the analyzed dataset name, in the table present in this Google Doc, in the row corresponding to your name.

Make a scatter plot of y versus x with an appropriate representation of the points, as well as naming and size of the axis labels and title. Arrange the plot “cosmetics” as you wish.

Save it into a .png file named dataset_name_surname.png (e.g., D2_Francesca_Finotello.png) and load it into this Google drive folder.