bind_rows: Bind simulation list into dataframe

View source: R/cropr_bind_split.R

bind_rowsR Documentation

Bind simulation list into dataframe

Description

Bind simulations list with different situations into a single dataframe

Usage

bind_rows(..., .id = NULL)

Arguments

...

Simulation outputs in Cropr format, i.e. a named list of data.frame for each situation.

.id

Name of the column in the new dataframe that identifies the origin of each row. If ... is a simulation output, it is set to "situation" by default.

Details

If ... is not of class cropr_simulation, it uses the regular function from dplyr. See e.g. SticsRFiles::get_sim() for an example output format.

Value

A single data.frame or tibble binding the rows of all data.Frames or tibbles included in sim

Note

You can perform the same for observations with the following: bind_rows(obs, .id = "situation").

See Also

split_df2sim

Examples

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

bind_rows(sim)

## End(Not run)

SticsRPacks/CroPloteR documentation built on May 8, 2024, 5:20 a.m.