# function to help reading # Albany, NY Central Park # monthly mean temperature # anomalies from file # anomaly_table_1950-2012.csv loaddata<-function(file=NA){ ############################################## # change the file name if you have # a different data directory name # or a different file name # the rest should work without modifications ############################################## file<-"data/anomaly_table_1950-2012.csv" res<-read.csv(file,skip=0) print("loaded monthly mean anomaly data from file") print(file) print("--------------------------") print("names of columns :") colnames<-names(res) ihelp<-length(colnames) for (i in 1:ihelp){ print(paste("column ",i,":",colnames[i])) } print("--------------------------") ihelp<-length(res[,1]) print(paste("length of time series:",ihelp)) print(paste("start time and month:",res[1,1],res[1,2])) print(paste("end time and month:",res[ihelp,1],res[ihelp,2])) return(res) }