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

From: Ken Spriggs <ksspriggs_at_gmail.com>
Date: Thu, 28 Feb 2008 07:12:50 -0800 (PST)

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, x2) : missing observations in cov/cor
>>> traceback()
>> 2: cor.default(x1, x2)
>> 1: cor(x1, x2)

>
> ``Clearly'' you must be using a non-standard cor. As Peter Dalgaard
> pointed out, cor() is not generic and there is no such function as
> cor.default() in ``standard R''.
>
> Suggestions:
>
> * Try find("cor") to see what package you are actually using.
>
> * Detach that package from the search list --- or remove cor from
> that position on
> the search list --- then you'll get the ``standard R'' version of
> cor() and all will be well.
>
> cheers,
>
> Rolf Turner
>
> ######################################################################
> Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
>
> ______________________________________________
> R-help_at_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.
>
>
-- 
View this message in context: http://www.nabble.com/Error-in-cor.default%28x1%2C-x2%29-%3A-missing-observations-in-cov-cor-tp15723848p15738523.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_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.
Received on Thu 28 Feb 2008 - 15:22:46 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 28 Feb 2008 - 15:30:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive