NormData_English: Normalizes the data.

NormDataR Documentation

Normalizes the data.

Description

Function that normalizes the data globally, or by column.

Usage

NormData(data, type = 1)

Arguments

data

Data to be analyzed.

type

1 normalizes overall (default),
2 normalizes per column.

Value

dataNorm

Normalized data.

Author(s)

Paulo Cesar Ossani

Marcelo Angelo Cirillo

Examples

 
data(DataQuan) # set of quantitative data

data <- DataQuan[,2:8]

res  <- NormData(data, type = 1) # normalizes the data globally

res # Globally standardized data

sd(res)   # overall standard deviation

mean(res) # overall mean


res <- NormData(data, type = 2) # normalizes the data per column

res # standardized data per column

apply(res, 2, sd) # standard deviation per column

colMeans(res)     # column averages

MVar documentation built on Aug. 19, 2023, 5:12 p.m.