run_map: run_map

View source: R/run_map.R

run_mapR Documentation

run_map

Description

[Deprecated]

run_map() was deprecated in favor of cfp_run_map for consistency.

Create a cfp_run_map for model alteration in alternate()

Usage

run_map(
  x,
  params = list(),
  type = NULL,
  method = NULL,
  n_runs = NULL,
  layers_different = FALSE,
  layers_from = "layers_map",
  layers_altmap = NULL,
  topheight_adjust = FALSE
)

Arguments

x

Either a cfp_pfres or cfp_fgres model result.

params

A named list of numeric vectors. Names indicate column names in soilphys, vectors either distinct values (method permutation) or limits (method random).

type

A vector of length param indicating what the values in params represent. One of

abs

Absolute values that are applied as-is.

factor

Factors to be multiplied with the original values.

addition

Factors to be added to the original values.

method

Either 'random', where a random value is chosen within the bounds set in params or 'permutation', where every permutation of the values in params is added.

n_runs

Integer value of the number of alterations to be done for method = 'random'.

layers_different

Should layers from layers_map be changed individually? If TRUE this allows for different changes at different depths.

layers_from

(character) If layers_different is TRUE, from which source should the layers be created? One of:

layers_map

(default) Use the layers that are defined in layers_map.

soilphys

Use the layers as defined in soilphys

layers_altmap

Use the layers as defined in the provided layers_altmap object.

layers_altmap

An optional layers_map created using layers_map() that defines the layers to be used if layers_different = TRUE.

topheight_adjust

(logical) If the proposed change in topheight is larger than the highest layer in soilphys, should the limits be automatically adjusted per id_cols individually? Default is FALSE, which leads to an error in that case.

Value

An object of type cfp_run_map that can be used within alternate.

Examples

PROFLUX <- ConFluxPro::base_dat |> pro_flux()
# Create a cfp_run_map where TPS is changed between 90 % and 110 %
# of the original value for 50 runs.
cfp_run_map(
  PROFLUX,
  list("TPS" = c(0.9, 1.1)),
  "factor",
  n_runs = 50)


ConFluxPro documentation built on Aug. 8, 2025, 7:01 p.m.