[R] error with princomp

Faheem Mitha faheem at email.unc.edu
Sat May 20 19:08:06 CEST 2000


Dear R people,

Thanks to everyone who replied to my questions about environments and
lexical scoping. It was very helpful. I am still working on understanding
this. My phone line has been dead for the last 24 hrs, so I was cut off
and could not reply earlier.

I now have another question. I am trying to use princomp with a data frame
of size (2061,98) so quite large. I successfully applied princomp in Splus
to it, but the R version exits with the following incomprehensible error:

Error in if (symmetric) { : missing value where logical needed

if (symmetric) does not appear in the code for princomp so I am flummoxed. 

My code follows. It is identical to that which I used for Splus. I doubt
if the problem will be clear from that, but if anyone wants my dataset to
try to reproduce the results, feel free to ask. In the meantime I am going
to take the princomp object from splus, dump it to a file, transfer it to
R, and pray it works.
      
                               Sincerely, Faheem Mitha.

************************************************************************
num <- 1:33
tanf <- rep("tanf",33)
tanf <- paste(tanf,num, sep="")
med <- rep("med",33)
med <- paste(med,num, sep="")
wage <- rep("wage",33)
wage <- paste(wage,num, sep="")

names <- c(tanf,med,wage)     #tanf, medicaid, wages (33,33,33)

rm(num,tanf,med,wage)

prin.df <- read.table("clus.dat",header= FALSE,
                                         row.names=NULL, col.names=names)

rm(names)

prin.df <- prin.df[ ,2:99]

prin.pr <- princomp(prin.df, cor = T)

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list