View source: R/save_temperature_scenarios.R
save_temperature_scenarios | R Documentation |
The temperature_generation can produce synthetic temperature scenarios, but it can take a while to run, especially for large ensembles of climate scenarios. The save_temperature_scenarios function can then save these scenarios to disk as a series of .csv files, so that they can later be used again, without re-running the generation function. Conversely, the load_temperature_scenarios function allows reading the data back into R. This function also works with any other list of data.frames.
save_temperature_scenarios(generated_temperatures, path, prefix)
generated_temperatures |
list of temperature scenarios produced with the temperature_generation function. |
path |
character string indicating the file path where the files are to be written. |
prefix |
character string specifying the prefix for all files. |
no values are returned, but files are written as a side_effect.
Eike Luedeling
temps<-list(Element1=data.frame(a=1,b=2),Element2=data.frame(a=c(2,3),b=c(8,4)))
# save_temperature_scenarios(temps,path=getwd(),prefix="temperatures")
# temps_reloaded<-load_temperature_scenarios(path=getwd(),prefix="temperatures")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.