#retreives berkeley total get_glb=function () { download.file("http://www.berkeleyearth.org/downloads/analysis-data.zip","temp.zip",mode="wb") handle=unz("temp.zip","Full_Database_Average_summary.txt") x=scan(handle,sep="\n",what="") close(handle) writeLines(x,"temp") x=read.table("temp",skip=19,colClasses=rep("numeric",5) ) names(x)=c("year","anom","unc","smooth","sm_uncert") x=ts(x,start=x$year[1]) return(x) }