Learn R Programming

chillR (version 0.75)

load_temperature_scenarios: Load temperature scenarios

Description

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.

Usage

load_temperature_scenarios(path, prefix)

Value

a list of temperature scenarios.

Arguments

path

character string indicating the file path where the files are to be written.

prefix

character string specifying the prefix for all files.

Author

Eike Luedeling

Examples

Run this code

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")

 

Run the code above in your browser using DataLab