################################################################################################# ## RClimate script to calculate common baseline LOTA for 5 series; # ## Plot trendslines and scatter plots # ## Original: 1/5/11 # ## D Kelly O'Day http://chartsgraphs.wordpress.com # ################################################################################################# graphics.off() save_dir<- "C:\\R_Home\\Charts & Graphs Blog\\RClimateTools\\Global_LOTA_consolidated_data\\" ## Establish baseline period - user can set baseline to any desired period baseline <- c(1979, 2008) ################################################################################################# ## Retreive LOTA source data from http://Processtrends.com series_link <- "http://processtrends.com/files/RClimate_consol_temp_anom_latest.csv" series <- read.table(series_link,header=T, as.is=T,sep=",") # n <- nrow(series) series_names<- c("GISS", "HadleyCRU", "NOAA", "RSS", "UAH") series_col <- c("red", "blue", "green", "yellow", "grey") ## Set data.frame to just 5 LOTA series lota <- series[,c(1, 3:7)] ## Calculate series offsets lota_s <- subset(lota, lota$yr_frac > baseline[1] & lota$yr_frac p2[1] & offset_mat[,1]