Summary statistics for one or several situations with observations, eventually grouped by a model version (or any group actually)

# S3 method for cropr_simulation
summary(
  ...,
  obs,
  stats = "all",
  all_situations = TRUE,
  verbose = TRUE,
  stat = lifecycle::deprecated()
)

Arguments

...

Simulation outputs (each element= model version), each being a named list of data.frame for each situation. See examples.

obs

A list (each element= situation) of observations data.frames (named by situation)

stats

A character vector of required statistics, "all" for all, or any of predictor_assessment().

all_situations

Boolean (default = TRUE). If TRUE, computes statistics for all situations.

verbose

Logical value for displaying information while running

stat

[Deprecated] stat is no longer supported, use stats instead.

Value

A list of statistics data.frames named by situation

See also

All the functions used to compute the statistics: predictor_assessment().

Examples

if (FALSE) {
# 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)
obs <- SticsRFiles::get_obs(workspace = workspace, usm = situations)

# All stats for the simulation:
summary(sim, obs = obs)

# All stats for two groups of simulations:
summary(sim1 = sim, sim2 = sim, obs = obs)

# Only R2 and nRMSE for one group:
summary(sim, obs = obs, stats = c("R2", "nRMSE"))
}