NormData {MFAg}R 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

[Package MFAg version 2.0 Index]