normalize: Normalize Function

Description Usage Arguments Value See Also Examples

View source: R/RegressionLibs.R

Description

Function to normalize data set in range of 0 to 1.

Usage

1
normalize(dataSet)

Arguments

dataSet

an object of class data frame with the original data set.

Value

an object of class data frame with a modified data set normalized in range of 0 to 1.

See Also

scaleData, normalizeData

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#Example 1
iris.x <- iris[,1:4] #Just numerical columns witout missing values
normedIris <- as.data.frame(lapply(iris.x, normalize)) # In range [0,1]


#Example 2
# Getting a data set without missing values
cars <- read.csv("https://dl.dropboxusercontent.com/u/12599702/autosclean.csv", sep = ";", dec = ",")

normedCars <- as.data.frame(lapply(cars, normalize)) # In range [0,1]

mariytu/RegressionLibs documentation built on May 21, 2019, 11:47 a.m.