#Example scripts to read the datasets for the statistics lecture #You have to adapt the path #Questions: tlaepple@awi.de #Read the global mean temperature from the GISS dataset. The first 8 lines are comments, the global mean temperature is #in column 2 data<-read.table("e:/data/lecture/statistics/data/GlobTemp_GISS.txt",skip=8,header=T) globtemp.giss<-ts(data[,2],start=data[1,1]) plot(globtemp.giss) #Read the NAO dataset, simple comma separated file data<-read.csv("e:/data/lecture/statistics/data/nao.csv") nao<-ts(data[,2],start=data[1,1]) #Read the hurricane number datasets, simple comma separated file data<-read.csv("e:/data/lecture/statistics/data/TC_basin.1.5.csv") basin<-ts(data[,2],start=data[1,1]) data<-read.csv("e:/data/lecture/statistics/data/TC_landfall.1.5.csv") landfall<-ts(data[,2],start=data[1,1]) #Option 1 for the NGRIP data, skip 71 lines, than read the tab-separated data data<-read.table("e:/data/lecture/statistics/data/NGrip.txt",skip=71,na.strings = "NaN") # Put it into a timeseries object. The timestep between two samples is 20 years dO18<-ts(data[,3],start=data[1,1],deltat=20) #Option 2 for the NGRIP data, skip 71 lines, than read the tab-separated data data<-read.table("e:/data/lecture/statistics/data/NGrip.txt",comment.char="%",na.strings = "NaN") # Put it into a timeseries object. The timestep between two sam dO18<-ts(data[,3],start=data[1,1],deltat=20) #Read the global mean temperature from the IPCC models. Simple text file with a header line: data<-read.table("e:/data/lecture/statistics/data/GlobTemp_IPCC.txt",header=T) globtemp.ipcc<-ts(data[,2],start=data[1,1])