median_center: Put the median of a numerical vector to 0

Description Usage Arguments Value Examples

View source: R/preprocess.R

Description

Given a numerical vector x, return x - median(x), where NA are removed in the calculation of median(x)

Usage

1

Arguments

x

A numberical vector (at least 2 non-NA items).

Value

The zero-median form of x.

Examples

1
2
x <- 1:10
median_center(x)

korkutlab/reflect documentation built on July 5, 2021, 7:38 a.m.