View source: R/visualization.R
| plot_scoring_curves | R Documentation |
Visualises the scoring function (0–1 transformation) for each variable in the configuration, overlaid on the observed data distribution. This plot is essential for verifying that the scoring configuration is biologically sensible before computing indices.
plot_scoring_curves(data, config, group_cols = "LandUse", ncol = 3)
data |
The raw (unscored) soil data frame. |
config |
A |
group_cols |
Character vector of grouping columns to exclude. |
ncol |
Integer. Number of columns in the facet grid. Default 3. |
A ggplot object.
data(soil_data)
cfg <- make_config(
variable = c("pH","EC","BD","OC","MBC","Clay"),
type = c("opt","less","less","more","more","opt"),
opt_low = c(6.0, NA, NA, NA, NA, 20),
opt_high = c(7.0, NA, NA, NA, NA, 35)
)
plot_scoring_curves(soil_data, cfg,
group_cols = c("LandUse","Depth"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.