Learn R Programming

liver (version 1.0)

transform: Z-score normalization

Description

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

Usage

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

Arguments

x

a numerical vector, matrix or data.frame.

method

a method to transfer the x.

na.rm

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

Value

transformed version of x.

See Also

zscore, minmax

Examples

Run this code
# NOT RUN {
x = c( 2.3, -1.4, 0, 3.45 )

transform( x, method = "minmax" )

transform( x, method = "zscore" )

# }

Run the code above in your browser using DataLab