summary.cropr_simulation: Summary statistics of simulations

View source: R/cropr_stats.R

summary.cropr_simulationR Documentation

Summary statistics of simulations

Description

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

Usage

## S3 method for class '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

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

## End(Not run)

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