normalizeData: Normalize Data Set

Description Usage Arguments Value See Also Examples

View source: R/RegressionLibs.R

Description

Function to normalize a data set. You could normalize in any range [min,max], but if you don't specify this values, this function make a normalization in range [0,1].

Usage

1
normalizeData(dataSet, min, max)

Arguments

dataSet

an object of class data frame with the original data set that you want normalize.

min

an integer with the min value that you want normalize the data set.

max

an integer with the max value that you want normalize the data set.

Value

an object of class data frame with a modified data set normalized in the defined range.

See Also

normalize, scaleData

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#Example 1
iris.x <- iris[,1:4] #Just numerical columns witout missing values

normedIris1 <- normalizeData(iris.x) #In range [0,1]
normedIris2 <- normalizeData(iris.x, 1, 10) #In ragen [1,10]


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

normedCars1 <- normalizeData(cars) #In range [0,1]
normedCars2 <- normalizeData(cars, 1, 10) #In ragen [1,10]

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