rescaling | R Documentation |
setrange
truncates a quantitative variable to have a set minimum
and maximum. setmin
truncates only to the minimum, and setmax
truncates only to the maximum. setmean
and setsd
set the
mean and standard deviation.
setrange(x, y, to = range(y))
setmin(x, y, to = min(y))
setmax(x, y, to = max(y))
setmean(x, y, to = mean(y))
setsd(x, y, to = sd(y))
x |
vector of scores to be modified. |
y |
optional vector of scores from which new parameters will be taken. |
to |
numeric value(s) that parameters in |
Returns a vector of length(x)
scores, with new parameters.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.