This post shows how to use RClimate.txt to retrieve a climate time series and write a csv file in 5 lines of R script.
One of my readers, Robert, wants to be able to download climate time series data and write it to a csv file. The R script below shows how to download the MEI data series and write a csv file. For this example I will use the RClimate function (func_MEI) to retrieve the data. I then simply specify the path and file name link for the output file (note quotes around the output file name and then write a csv file.
source("http://processtrends.com/files/RClimate.txt" m <- func_MEI() head(m) output_link <- "C://R_Home/mei.csv" write.csv(m, output_link, quote=FALSE, row.names = F)