rescaling: Rescaling Scores

rescalingR Documentation

Rescaling Scores

Description

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.

Usage

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))

Arguments

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 x will be set to, defaulting to the min, max, range, mean, or sd of y.

Value

Returns a vector of length(x) scores, with new parameters.


talbano/epmr documentation built on Aug. 25, 2023, 1:35 p.m.