| score_more | R Documentation |
Applies a "more is better" linear scoring function, transforming raw variable values to a 0–1 score. This is appropriate for soil indicators where higher values improve soil function, such as organic carbon, microbial biomass, or cation exchange capacity (Andrews et al., 2004; Karlen & Stott, 1994).
The score is computed as:
S_i = \frac{x_i - x_{\min}}{x_{\max} - x_{\min}}
where x_{\min} and x_{\max} are taken from the observed
data (or from user-supplied bounds).
score_more(x, x_min = NULL, x_max = NULL)
x |
Numeric vector of raw variable values. |
x_min |
Numeric. Lower bound for scoring. Defaults to
|
x_max |
Numeric. Upper bound for scoring. Defaults to
|
Numeric vector of scores in [0, 1].
Andrews, S.S., Karlen, D.L., & Cambardella, C.A. (2004). The soil management assessment framework. Soil Science Society of America Journal, 68(6), 1945–1962. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2136/sssaj2004.1945")}
Karlen, D.L., & Stott, D.E. (1994). A framework for evaluating physical and chemical indicators of soil quality. In J.W. Doran et al. (Eds.), Defining Soil Quality for a Sustainable Environment, pp. 53–72. SSSA Special Publication 35. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2136/sssaspecpub35.c4")}
oc <- c(0.5, 1.2, 2.1, 3.4, 4.5) # Organic Carbon (%)
score_more(oc)
# With user-defined bounds (e.g., 0 to 5%)
score_more(oc, x_min = 0, x_max = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.