Learn R Programming

chillR (version 0.75)

convert_scen_information: Converts list of change scenarios to data.frame or vice versa

Description

Allows the user to convert a list of change scenarios to a single data.frame or vice versa. If it converts from data.frame to list, the user can decide if the returned list should be flat or structured. In case of a list of change scenarios, the list should have named elements. In case of composite names, the function assumes that the location is the first part of the composite name, composite elements are seperated by dot.

Usage

convert_scen_information(scenario_object, give_structure = TRUE)

Value

list / data.frame with relative change scenarios

Arguments

scenario_object

can be either a data.frame or a list of change scenarios. If it is a data.frame, it containing the relative change scenarios

give_structure

boolean, by default set TRUE. If set TRUE, then the output is a nested list of the structure: 1) Location 2)SSP 3)GCM 4)Timepoint. If set FALSE, then returns flat list with names following the scheme: Location.SSP.GCM.Timepoint.

Author

Lars Caspersen