Re: [R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-28 Thread Erik Iverson
t;> -Ursprüngliche Nachricht----- >> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im >> Auftrag von Ken Spriggs >> Gesendet: Wednesday, February 27, 2008 4:34 PM >> An: r-help@r-project.org >> Betreff: [R] Error in cor.default(x1, x2) : missing observations

Re: [R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-28 Thread Ken Spriggs
Here's what happened... > stats::cor(x1,x2) Error in stats::cor(x1, x2) : missing observations in cov/cor Erik Iverson wrote: > > OK, that is not the definition of cor in the stats package. Some add-on > package you are loading might be overwriting it. > > What happens if you do > > stat

Re: [R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-28 Thread Ken Spriggs
mplete.obs") Does it too. > > - > cuncta stricte discussurus > - > > -Ursprüngliche Nachricht- > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im > Auftrag von Ken Spriggs > Gesendet: Wednesday, February 27, 2008 4:34 PM > An: r-help@r-project.org &

Re: [R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-28 Thread Ken Spriggs
Thanks. > find("cor") [1] "package:fUtilities" "package:stats" Rolf Turner-3 wrote: > > > On 28/02/2008, at 11:11 AM, Ken Spriggs wrote: > >> >> I get the following >> >>> class(x1) >> [1] "numeric" >>> class(x2) >> [1] "numeric" >> >> and: >> >>> cor(x1,x2) >> Error in cor.default(x1, x

Re: [R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-27 Thread Daniel Malter
esday, February 27, 2008 7:41 PM An: 'Ken Spriggs'; 'r-help@r-project.org' Betreff: AW: [R] Error in cor.default(x1, x2) : missing observations in cov/cor Does the code below solve your problem? If you have NAs in the same rows, you have to use "c" or "p" as use

Re: [R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-27 Thread Daniel Malter
ailto:[EMAIL PROTECTED] Im Auftrag von Ken Spriggs Gesendet: Wednesday, February 27, 2008 4:34 PM An: r-help@r-project.org Betreff: [R] Error in cor.default(x1, x2) : missing observations in cov/cor Hello, I'm trying to do cor(x1,x2) and I get the following error: Error in cor.default(x1, x2) :

Re: [R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-27 Thread Rolf Turner
On 28/02/2008, at 11:11 AM, Ken Spriggs wrote: > > I get the following > >> class(x1) > [1] "numeric" >> class(x2) > [1] "numeric" > > and: > >> cor(x1,x2) > Error in cor.default(x1, x2) : missing observations in cov/cor >> traceback() > 2: cor.default(x1, x2) > 1: cor(x1, x2) ``Clearly'' you mu

Re: [R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-27 Thread Erik Iverson
OK, that is not the definition of cor in the stats package. Some add-on package you are loading might be overwriting it. What happens if you do stats::cor(x1,x2) ? Ken Spriggs wrote: > I get the following: > >> cor > function (x, y = NULL, use = "all.obs", method = c("pearson", > "ken

Re: [R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-27 Thread Ken Spriggs
I get the following: > cor function (x, y = NULL, use = "all.obs", method = c("pearson", "kendall", "spearman")) { UseMethod("cor") } Erik Iverson wrote: > > What happens when you type "cor" at the R prompt? Perhaps your calling > of the cor function is not calling the cor functi

Re: [R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-27 Thread Ken Spriggs
I get the following > class(x1) [1] "numeric" > class(x2) [1] "numeric" and: > cor(x1,x2) Error in cor.default(x1, x2) : missing observations in cov/cor > traceback() 2: cor.default(x1, x2) 1: cor(x1, x2) Peter Dalgaard wrote: > > Ken Spriggs wrote: >> Hello, >> >> I'm trying to do cor(x1,

Re: [R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-27 Thread Erik Iverson
What happens when you type "cor" at the R prompt? Perhaps your calling of the cor function is not calling the cor function in the stats package? Ken Spriggs wrote: > Hello, > > I'm trying to do cor(x1,x2) and I get the following error: > Error in cor.default(x1, x2) : missing observations in

Re: [R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-27 Thread Peter Dalgaard
Ken Spriggs wrote: > Hello, > > I'm trying to do cor(x1,x2) and I get the following error: > Error in cor.default(x1, x2) : missing observations in cov/cor > > A few things: > 1. I've used cor() many times and have never encountered this error. > 2. length(x1) = length(x2) > 3. is.numeric(x1) =

[R] Error in cor.default(x1, x2) : missing observations in cov/cor

2008-02-27 Thread Ken Spriggs
Hello, I'm trying to do cor(x1,x2) and I get the following error: Error in cor.default(x1, x2) : missing observations in cov/cor A few things: 1. I've used cor() many times and have never encountered this error. 2. length(x1) = length(x2) 3. is.numeric(x1) = is.numeric(x2) = TRUE 4. which(is