View source: R/transformations.R
diminish | R Documentation |
Negative exponential (Diminish returns)
diminish(v, m, abs = TRUE)
v |
Numeric vector |
m |
Scale of diminishing as a numeric integer or decimal |
abs |
Boolean to determine if diminishing scale |
Applies the negative exponential (1 - exp(-x/m)) on the input vector, v
The transformed vector v
diminish(c(1,0,0,0,1,0,0,0,2), 1) diminish(c(1,0,0,0,1,0,0,0,2), 1, FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.