Scoring functions
score.rescale(x, xlim = NULL, method = "linear", ...)
x | A numeric vector of data. |
---|---|
xlim | The scoring range. If null, derives range from data. |
method | Only 'linear' is supported. |
... | Arguments for min, max, pmin, pmax. |
p | A percentage buffer to add to the maximum value. |
Returns scores.
min, max, pmin, pmax
score.max(c(0.5, 1, 2))#> [1] 0.25 0.50 1.00score.max(c(0.5, 1, 2), p=0.25)#> [1] 0.2 0.4 0.8score.rescale(c(0.5, 1, 2))#> [1] 0.0000000 0.3333333 1.0000000score.clamp(c(-0.5, 1, 2))#> [1] 0 1 1score.clamp(c(-0.5, 1, 2), xlim=c(-1, 1))#> [1] -0.5 1.0 1.0