[R] PCA error: svd(x, nu=0) infinite or missing values

Silvia Lomascolo slomascolo at zoo.ufl.edu
Sat Jan 5 00:48:31 CET 2008


Hi,
I am trying to do a PCA on my data but I keep getting the error message

svd(x, nu=0) infinite or missing values

>From the messages posted on the subject, I understand that the NAs in my
data might be the problem, but I thought na.omit would take care of that. 
Less than 5% of my cells are missing data. However, the NAs are not
regularly distributed across my matrix: certain cases and variables have
most of the NAs in the data set. Might that be the problem?  Any hints as to
how to resolve this without having to get rid of those cases and variables?
Code is pasted below.

Any help is greatly appreciated!

Silvia. 

CODE:

ot = read.table('C:\\Documents and Settings\\...\\matrix.txt', header=T)
ot.pca = prcomp(ot, scale.=T, na.omit)#this is as far as I got. I have also
tried princomp but I get a very similar error message

I use Windows, and R version 2.6.0.
-- 
View this message in context: http://www.nabble.com/PCA-error%3A-svd%28x%2C-nu%3D0%29-infinite-or-missing-values-tp14627432p14627432.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list