recalib | R Documentation |
Rescale variables (one at a time) to have a new minimum and maximum value.
recalib(data, var, low, high)
data |
the dataset to use. |
var |
indicate the variable number (or variable name). |
low |
Indicate the new minimum value. |
high |
Indicate the new maximum value. |
Specify the rescaling of variables one at a time.
Francis Huang
genmvnorm revcode dtrans
sdata <- genmvnorm(cor = c(.7, .2, .3), k = 3, n = 500, seed = 12345) cor(sdata) summary(sdata[,1]) #note the min and max of variable X1 #changes variable one to have a minimum of 10 and a maximum of 50 #correlations remain the same s2 <- recalib(sdata, 1, 10, 50) cor(s2) summary(s2[,1]) #note revised values of variable X1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.