Learn R Programming

SciencesPo (version 0.3.8.27)

rescale: Rescaling as Z-scores and Centering

Description

Provides a rapidly way to generate standard variables.

Usage

rescale(x, fun = "center")

Arguments

x
A vector to be computed
fun
A function to be applied: 'z-score' or 'z', the default is 'center' or 'c'.

Value

  • An object the same class as x.

Examples

Run this code
x <- sample(10)

rescale(x)

Run the code above in your browser using DataLab