View source: R/data_handling.R
collate_proc_data | R Documentation |
collate_proc_data
collates multiple data frames generated by any of the
'collate' functions. This may be useful when, for example, data generated by
different ST scenarios and/or 'standard' scenario runs are to be combined
into a unique dataframe that can then be passed to other functions.
collate_proc_data(data, save2disk = TRUE, dir_out = "ProcessedData")
data |
A list where each element is a df from |
save2disk |
Whether to save the data as rda and csv, default: TRUE |
dir_out |
The local path to store the output. Default: ProcessedData |
Only dfs generated by the same function can be combined together. Missing data are filled with NA.
When save2disk=TRUE
the output file will be named 'CombinedDB'.
dir_out
is created within the working directory unless a full path is
provided.
A data.frame with the collated data. Missing data are filled with NA.
# Using Campbell et al. example data. See ?sta.main, ?sta.evy5, ?sta.evy5.b11 # for more details. data(sta.main, sta.evy5, sta.evy5.b11) dfs <- list(sta.main, sta.evy5, sta.evy5.b11) combined <- collate_proc_data(dfs, save2disk=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.