It should not: na.action is only a valid argument for the formula method,
Current R-devel says
Usage:
## S3 method for class 'formula':
princomp(formula, data = NULL, subset, na.action, ...)
## S3 method for class 'default':
princomp(x, cor = FALSE, scores = TRUE, covmat = NULL,
subset = rep(TRUE, nrow(as.matrix(x))), ...)
which may help you see where you misread.
Just apply na.omit to the matrix/data.frame argument directly.
On Tue, 15 Jul 2003 [EMAIL PROTECTED] wrote:
> Full_Name: Jerome Asselin
> Version: 1.7.1
> OS: Red Hat Linux 7.2
> Submission from: (NULL) (24.77.125.119)
>
>
>
> Setting the parameter na.action=na.omit should remove
> incomplete records in princomp. However this does not
> seem to work as expected. See example below.
>
> Sincerely,
> Jerome Asselin
>
>
> data(USArrests)
> princomp(USArrests, cor = TRUE) #THIS WORKS
>
> USArrests[1,3] <- NA
> princomp(USArrests, cor = TRUE, na.action=na.omit) #THIS FAILS!
> #Error in cov.wt(z) : x must contain finite values only
>
> ______________________________________________
> [EMAIL PROTECTED] mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
>
--
Brian D. Ripley, [EMAIL PROTECTED]
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-devel