[Rd] "na.action" parameter in princomp() (PR#3481)

jerome at hivnet.ubc.ca jerome at hivnet.ubc.ca
Tue Jul 15 09:22:40 MEST 2003


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



More information about the R-devel mailing list