View source: R/cropr_bind_split.R
split_df2sim | R Documentation |
Split a row-binded data.frame (or tibble) into a Cropr format simulation list.
split_df2sim(df, add_cropr_attr = TRUE)
df |
A single data.frame or tibble containing simulation results
(as created by |
add_cropr_attr |
A logical to indicate if the cropr_simulation attribute must be added to the resulting variable Set FALSE if you apply the function to observed data, TRUE otherwise (optional, default value = TRUE). |
A named list of data.frame
for each situation, having the attribute
cropr_simulation.
bind_rows
## Not run:
# Importing an example with three situations with observation:
workspace <- system.file(file.path("extdata", "stics_example_1"),
package = "CroPlotR"
)
situations <- SticsRFiles::get_usms_list(
usm_path =
file.path(workspace, "usms.xml")
)
sim <- SticsRFiles::get_sim(workspace = workspace, usm = situations)
df <- bind_rows(sim)
split_df2sim(df)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.