Rescales x such that for the rescaled data it holds: mean(scale_to(x, mean=target))==target and
sd(scale_to(x, sd=target)==abs(target). A negative value of sd will change the sign of the x values.
Usage
scale_to(x, mean = 0, sd = 1)
Value
Rescaled data.
Arguments
x
numeric: vector of values
mean
numeric: mean of the rescaled x (default: 0)
sd
numeric: standard deviation of the transformed x (default: 1)