AddPCsToEnd: Perform PCA

Description Usage Arguments Value See Also

View source: R/preprocessing.R

Description

Perform PCA

Usage

1
2
3
4
5
6
AddPCsToEnd(
  inputted.data,
  columns.to.do.PCA.on,
  scale.boolean,
  minimum.variance.percent
)

Arguments

inputted.data

A dataframe.

columns.to.do.PCA.on

A vector of strings that specify the column names to use for PCA.

scale.boolean

Boolean specifying if data should be scaled before PCA.

minimum.variance.percent

Value from 0-100 specifying how much percentage of total variance a principal component needs to meet or exceed to be kept.

Value

A List object that contains 3 elements:

  1. A dataframe with the PCs added to the end and the names of the PC columns.

  2. A vector with the names of PCs.

  3. The pca.results object from prcomp().

See Also

Other Preprocessing functions: AddColBinnedToBinary(), AddColBinnedToQuartiles(), ConvertDataToPercentiles(), CorAssoTestMultipleWithErrorHandling(), DownSampleDataframe(), GenerateElbowPlotPCA(), GeneratePC1andPC2PlotsWithAndWithoutOutliers(), Log2TargetDensityPlotComparison(), LookAtPCFeatureLoadings(), MultipleColumnsNormalCheckThenBoxCox(), NormalCheckThenBoxCoxTransform(), RanomlySelectOneRowForEach(), RecodeIdentifier(), RemoveColWithAllZeros(), RemoveRowsBasedOnCol(), RemoveSamplesWithInstability(), SplitIntoTrainTest(), StabilityTestingAcrossVisits(), SubsetDataByContinuousCol(), TwoSampleTTest(), ZScoreChallengeOutliers(), captureSessionInfo(), correlation.association.test(), describeNumericalColumnsWithLevels(), describeNumericalColumns(), generate.descriptive.plots.save.pdf(), generate.descriptive.plots()


yhhc2/machinelearnr documentation built on Dec. 23, 2021, 7:19 p.m.