Barth B. Riley
2010-Oct-11 14:27 UTC
[R] Trouble accessing cov function from stats library
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 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 ________________________________ PRIVILEGED AND CONFIDENTIAL INFORMATION This transmittal and any attachments may contain PRIVILEGED AND CONFIDENTIAL information and is intended only for the use of the addressee. If you are not the designated recipient, or an employee or agent authorized to deliver such transmittals to the designated recipient, you are hereby notified that any dissemination, copying or publication of this transmittal is strictly prohibited. If you have received this transmittal in error, please notify us immediately by replying to the sender and delete this copy from your system. You may also call us at (309) 827-6026 for assistance. [[alternative HTML version deleted]]
David Winsemius
2010-Oct-11 14:41 UTC
[R] Trouble accessing cov function from stats library
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 foundYou 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 > > BarthDavid Winsemius, MD West Hartford, CT
Note that R is case sensitive, so cov and Cov are different.>>>From: "Barth B. Riley" <bbriley@chestnut.org> To:"r-help@r-project.org" <r-help@r-project.org> Date: 12/Oct/2010 3:31a Subject: [R] Trouble accessing cov function from stats library 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 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 ________________________________ PRIVILEGED AND CONFIDENTIAL INFORMATION This transmittal and any attachments may contain PRIVILEGED AND CONFIDENTIAL information and is intended only for the use of the addressee. If you are not the designated recipient, or an employee or agent authorized to deliver such transmittals to the designated recipient, you are hereby notified that any dissemination, copying or publication of this transmittal is strictly prohibited. If you have received this transmittal in error, please notify us immediately by replying to the sender and delete this copy from your system. You may also call us at (309) 827-6026 for assistance. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R ( http://www.r/ )-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]]