Learn R Programming

PreProcessing (version 0.1.0)

cubitize: Cubitizes the matrix given as input

Description

Cubitizes the matrix given as input

Usage

cubitize(xx)

Arguments

xx

Matrix or a data frame of numeric entries

Value

Matrix with columns that have minimum zero and maximum one

Examples

Run this code
# NOT RUN {
# I don't want you to run this
# }
# NOT RUN {
n<-450; x <- data.frame(cbind(rnorm(n, 162, 4), rnorm(n, 108, 2),
rnorm(n, 117, 3), rnorm(n, 36, 2), rnorm(n, 45, 2)))
p <- ncol(x)
x.cube <- cubitize(x)
round(head(x),2)
round(head(x.cube),2)
round(rbind(apply(x, 2, min), apply(x.cube, 2, min)),2)
round(rbind(apply(x, 2, max),apply(x.cube, 2, max)),2)
oldpar<-par(mfrow=c(1,2))
boxplot(x[,1:min(5,p)], main='Original Data', col=rainbow(9))
boxplot(x.cube[,1:min(5,p)], main='PreProcessed Data', col=rainbow(7))
par(oldpar)
# }

Run the code above in your browser using DataLab