Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


multicon (version 1.6)

scale2: Scale

Description

Returns scores in x after rescaling

Usage

scale2(x, center = TRUE, scale = TRUE)

Arguments

x
A numeric vector, matrix or data.frame
center
A logical indicating whether the scores in the columns in x should have their column means subtracted
scale
A logical indicating where the scores in the columns in x should be divided by their column standard deviations

Value

Returns a variable with dimensions equal to that has been scaled according to the arguments used

Details

The built-in R function scale uses the sample standard deviation when its scale option is set to TRUE. This function uses the population standard deviation instead.

See Also

scale

Examples

Run this code
scale(1:5)
scale2(1:5)
	

Run the code above in your browser using DataLab