transform: Z-score normalization

Description Usage Arguments Value Author(s) See Also Examples

View source: R/transform.R

Description

Performs variable transformation such as Z-score and min-max normalization.

Usage

1
transform( x, method = c( "minmax", "zscore" ), columns = NULL, na.rm = FALSE )

Arguments

x

a numerical vector, a matrix or a data.frame.

method

a method to transfer x.

columns

which columns are going to tranfer for the cases that x is a matrix or a data.frame. Defaults to all columns.

na.rm

a logical value indicating whether NA values in x should be stripped before the computation proceeds.

Value

transformed version of x.

Author(s)

Reza Mohammadi a.mohammadi@uva.nl and Kevin Burke kevin.burke@ul.ie

See Also

zscore, minmax

Examples

1
2
3
4
5
x = c( 2.3, -1.4, 0, 3.45 )

transform( x, method = "minmax" )

transform( x, method = "zscore" )

liver documentation built on Oct. 27, 2021, 5:06 p.m.