Transforms performance metrics from FLmse or FLmsea objects, stored as a data.table into an FLQuant pr FLQuants object.

trackingFLQuant(x)

trackingFLQuants(x)

Arguments

x

An object of class FLmse, FLmses, or a data.table.

Value

If a single management procedure (mp) is present, returns a single FLQuant object. If multiple management procedures are present, returns a list of FLQuant objects, one per mp. When biol column is present, it is renamed to unit in the resulting FLQuant or FLQuants.

Details

If x is of class FLmse or FLmses, the performance slot is extracted automatically. The data.table must contain columns: statistic, year, iter, data, and mp. Optionally, a biol column can be present, as in the performance table obtained from callin mp() on an FLombf OM. Values for each biol will be separated using the 'unit' dimension.

The first (quant) dimension of the FLQuant or FLQuants contain the statistics, named as in the statistic column of the performance table.

When results from multiple management procedures are present, the output is an FLQuants list of FLQuant objects, one per mp.

See also

Examples

if (FALSE) { # \dontrun{
  # Using a data.table directly
  perf_dt <- data.table(
    statistic = rep("SSB", 4),
    year = rep(2025:2026, 2),
    iter = rep(1:2, each = 2),
    data = runif(4, 1000, 3000),
    mp = "MP1"
  )
  quant <- trackingFLQuant(perf_dt)
  quants <- trackingFLQuants(perf_dt)
} # }