Learn R Programming

SciencesPo (version 0.03.21)

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.

encoding

UTF-8

Examples

Run this code
x <- sample(10)

rescale(x)

Run the code above in your browser using DataLab