NormData_English: Normalizes the data.

Description Usage Arguments Value Author(s) Examples

Description

Function that normalizes the data globally, or by column.

Usage

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
 
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

MFAg documentation built on Jan. 13, 2021, 6:39 p.m.