[R] Help on Principal Component Analysis in R

R Help! emanekaf5 at gmail.com
Wed Jan 14 00:17:11 CET 2015


Hello!

I am a beginner to R. I have read several guides, but still am stuck on
this:

I have data in an excel csv file, on which I want to run PCA.
I'm not sure how the prcomp formula works. The help page states:
prcomp(x, retx = TRUE, center = TRUE, scale. = FALSE,
tol = NULL, ...)

what is x referring to? I tried putting the file name for x, but i get the
following error:
Error in colMeans(x, na.rm = TRUE) : 'x' must be numeric

what kind of numeric value do I need to put in for x?

Potentially helpful information: my data sheet has around 48 columns and
over 7000 rows. I have converted the csv file into a matrix in R.

Thanks in advance for all your help.

I'd appreciate step by step instructions on how to go from my csv file to a
PCA biplot in R.

	[[alternative HTML version deleted]]



More information about the R-help mailing list