Learn R Programming

DMTL (version 0.1.2)

norm_data: Normalize matrix per column in [0, 1]

Description

This function normalizes each column of a dataframe or matrix (-alike) between 0 and 1.

Usage

norm_data(X)

Arguments

X

Dataframe or matrix (-alike) containing data.

Value

The normalized dataframe.

Examples

Run this code
# NOT RUN {
X <- matrix(rnorm(1000, 0.2, 0.3), nrow = 100)
X_norm <- norm_data(X)
print(range(X_norm))

# }

Run the code above in your browser using DataLab