[R] princomp error

Adaikalavan Ramasamy ramasamy at cancer.org.uk
Fri Jul 27 12:11:23 CEST 2007


You probably got some missing or undefined values.

Either eyeball the data or use sum(is.na(x)), sum(is.nan(x)), 
sum(is.infinite(x)) to find out if you have such data. You may want to 
use which() to find out where they are.

Regards, Adai


Bricklemyer, Ross S wrote:
> I am attempting to run principal components analysis on a dataset of
> spectral reflectance (6 decimal places).  I imported the data using
> read.table and there are both column and row headers.  When I run
> princomp I receive the following error:
> 
>  
> 
> Error in cov.wt(z) : 'x' must contain finite values only
> 
>  
> 
> Where am I going wrong?
> 
>  
> 
> Ross
> 
>  
> 
> *******************************************************************
> Ross Bricklemyer
> Dept. of Crop and Soil Sciences
> Washington State University
> 291D Johnson Hall
> PO Box 646420
> Pullman, WA 99164-6420
> Work: 509.335.3661
> Cell/Home: 406.570.8576
> Fax: 509.335.8674
> Email: rsb at wsu.edu
> 
> 
> 
> 
> 
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
> 
> 
>



More information about the R-help mailing list