[R] Trouble accessing cov function from stats library

David Winsemius dwinsemius at comcast.net
Mon Oct 11 16:41:42 CEST 2010


On Oct 11, 2010, at 10:27 AM, Barth B. Riley wrote:

> Dear all
>
> I am trying to use the cov function in the stats library. I have no  
> problem using this function from the console. However, in my R  
> script I received a "function not found" message. Then I called  
> stats::cov(...) and received an error message that the function was  
> not exported. Then I tried stats:::cov (three colons) and received  
> the error
>
> Error in get(name, envir = asNamespace(pkg), inherits = FALSE) :
>  object 'Cov' not found

You are misspelling it. R is case-sensitive.

> I am also importing the ltm library, though I'm not aware of a cov  
> function in ltm that could be causing a conflict. Any suggestions?
>
> Thanks
>
> Barth


David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list