On Thu, 16 Sep 2004, Mayeul KAUFFMANN claimed:
> ?cor says it accepts data.frame. In fact, it does iff they have no (or
It actually says
x: a numeric vector, matrix or data frame.
^^^
If you want to do the conversions as you say, you should be calling
data.mat
e:
NAs introduced by coercion
From: "Martin Maechler" <[EMAIL PROTECTED]>
To: "Mayeul KAUFFMANN" <[EMAIL PROTECTED]>
> Mayeul> #I found the obvious workaround:
> Mayeul> COR <- matrix(rep(0, 81),9,9)
> Mayeul> for (i in 1:9) for (j in
81),9,9)
for (i in 1:9) for (j in 1:9) {if (i>j) COR[i,j] <- cor (x[,i],x[,j])}
#which works fine, with no warning
#looks like a "cor()" bug.
#I checked absence of NA's by
x <- x[complete.cases(x),]
summary(x)
apply(x,2, function (x) (sum(is.na(x
#I use R 1.9.1
Che
ction should truncate the error message, find how many parenthesis
and brackets are open in the remaining part, substract the number of
closing parenthesis and brackets, and add that many parenthesis at the
end.
(Xemacs parentheses highligher regards "(" and "[" as equivalent)
Ma