CalculateVariance: Calculate Variance Function

Description Usage Arguments Value See Also Examples

View source: R/RegressionLibs.R

Description

Function to calculate de variance of an specific column.

Usage

1

Arguments

dataSet

an object of class data frame with a data set that you want calculate the variance.

col

an integer that represent the column that you want calculate the variance.

Value

an object of class data frame with a modified data set with variance calculated.

See Also

elbowPlot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#This function is used by elbowPlot
#Example 1
iris.x <- iris[,1:4] # These are the independent variables
# We know that there are no missing values in the data set

# performing prcomp
ir.pca <- prcomp(iris.x, center = TRUE, scale. = TRUE)

# Generating elbow plot to detect the most important principal components
elbowPlot(ir.pca)

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