scale: Scale a data frame or matrix

Description Usage Arguments Details Value Examples

Description

Scale a data frame or matrix

Usage

1
scale(data, scale.type = 1)

Arguments

data

a data frame or vector

scale.type

one of "sd" (default) for mean centered standard deviation scaled, "medmad" for median centered median absolute deviation scaled, "medsd" for median centered standard deviation scaled, "mean" for mean centered but unscaled, or "med" for median centered but unscaled. Also accepts 1, 2, 3, 4, and 5 respectively as input types.

Details

an improvement of the base R scale function. Unlike R's standard scale function, this allows for factor columns or character columns to be present in the data, and will simply leave those untouched without throwing an error.

Value

A data frame

Examples

1

abnormally-distributed/Bayezilla documentation built on Oct. 31, 2019, 1:57 a.m.