[R] PCA - "cov.wt(z) : 'x' must contain finite values only"

From: Johnson, Bethany <bethany.johnson_at_citi.com>
Date: Tue, 18 Dec 2007 13:14:05 -0500

I am trying to run PCA on a matrix (the first column and row are headers). There are several cells with NA's. When I run PCA with the following code:

AsianProp<-read.csv("Matrix.csv", sep=",", header=T, row.names=1) attach(AsianProp)
AsianProp.pca<-princomp(AsianProp, na.omit)

I get the error message:

cov.wt(z) : 'x' must contain finite values only

What am I doing wrong?

Thanks very much!

        [[alternative HTML version deleted]]

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 18 Dec 2007 - 18:17:58 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 18 Dec 2007 - 19:31:14 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.