NormData {MVar}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]

Resp = NormData(data, type = 1) # normalizes the data globally

Resp # Globally standardized data

sd(Resp)   # overall standard deviation

mean(Resp) # overall mean


Resp = NormData(data, type = 2) # normalizes the data per column

Resp # standardized data per column

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

colMeans(Resp)     # column averages

[Package MVar version 2.0.9 Index]