[R] Setting a class / outcome variable for Weka Principal Components Analysis

Suranga Kasthurirathne surangakas at gmail.com
Thu Oct 30 17:26:31 CET 2014


Hi everyone,

I've relatively new to R, and i'm trying to use it to perform a Principal
Components analysis (PCA)
I've done this using WEKA previously, and now i'm trying to do so using R's
prcomp and princomp (both options would work for me).

One problem i've found is that while WEKA PCA allows us to specify a class
/ outcome variable / column for the dataset, apparently R project (both
prcomp and princomp) don't.

I've read through a number of documents including this
<http://cran.r-project.org/web/packages/HSAUR/vignettes/Ch_principal_components_analysis.pdf>
with limited success, so wanted to raise this question here. How does one
set the class variable when performing a PCA ?
Any advice would be  greatly appreciated !


-- 
Best Regards,
Suranga

	[[alternative HTML version deleted]]



More information about the R-help mailing list