##### Lesson 5: Let us 'R'eview ##### # Setting the working directory setwd(“provide the path to your folder“) list.files() # reading the input files nyctemperature = read.table("nyc_temperature.txt",header=TRUE) # define sample space S as all data S = nyctemperature # define set A as the february days A = which(S[,2]==2) # define set B as the warm days B = which(S[,7]>=50) # intersection of A and B C = intersect(A,B) # define set D as the cold days D = which(S[,7]<=25) # define set E as Saturdays E = which(S[,4]=="Saturday") # intersection of D and E F = intersect(D,E)