scale_norm: Performs transformation on continuous variables.

Description Usage Arguments Value Examples

View source: R/scale_norm.R

Description

Performs transformation on continuous variables for the heatmap color scales.

Usage

1
scale_norm(x, trans_type = c("percentize", "normalize", "scale", "none"))

Arguments

x

Numeric vector.

trans_type

Character string of 'normalize', 'scale' or 'none'. If 'scale', subtract the mean and divide by the standard deviation. If 'normalize', i.e., max-min normalize, subtract the min and divide by the max. If 'none', no transformation is applied. More information on what transformation to choose can be acquired here: https://cran.rstudio.com/package=heatmaply/vignettes/heatmaply.html#data-transformation-scaling-normalize-and-percentize

Value

Numeric vector of the transformed 'x'.

Examples

1
2
scale_norm(1:5)
scale_norm(1:5, 'normalize')

treeheatr documentation built on Nov. 20, 2020, 1:07 a.m.