center: Simple centering helper

View source: R/center.R

centerR Documentation

Simple centering helper

Description

Simple centering helper

Usage

center(x, na.rm = TRUE)

Arguments

x

Numeric variable.

na.rm

Remove missing values (default TRUE)?

Value

Numeric variable centered around its mean.

Examples

center(c(1, 2, 3, 5, 3, 2), na.rm = TRUE)
center(c(1, NA, NA, 5, 3, 2), na.rm = TRUE)

vjilmari/vjihelpers documentation built on May 23, 2022, 6:43 p.m.