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.na(x1))  = which(is.na(x2)) = integer(0)   {the same goes for
is.nan()}
5.  I also try cor(x1,x2, use = "all.obs") and get the same error.

What can be going wrong?


-- 
View this message in context: 
http://www.nabble.com/Error-in-cor.default%28x1%2C-x2%29-%3A-missing-observations-in-cov-cor-tp15723848p15723848.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to