When a library is loaded messages such as these are displayed: The following object is masked from ?package:base?: norm The following object is masked from ?package:NADA?: cor What do I read to understand just what being masked means? Rich
Hi Rich, I believe it means that when called, the function norm() in the 'base' and the function cor () in the 'NADA' packages are not going to be used, but rather functions of the same name (norm and cor) in the package that you loaded with your library () function. Same applies to other objects also. HTH, Ranjan On Wed, 24 Sep 2014 11:22:55 -0700 Rich Shepard <rshepard at appl-ecosys.com> wrote:> When a library is loaded messages such as these are displayed: > > The following object is masked from ?package:base?: > > norm > > The following object is masked from ?package:NADA?: > > cor > > What do I read to understand just what being masked means? > > Rich > > ______________________________________________ > 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.-- Important Notice: This mailbox is ignored: e-mails are set to be deleted on receipt. Please respond to the mailing list if appropriate. For those needing to send personal or professional e-mail, please use appropriate addresses. ____________________________________________________________ Receive Notifications of Incoming Messages Easily monitor multiple email accounts & access them with a click. Visit http://www.inbox.com/notifier and check it out!
On 24/09/2014 2:22 PM, Rich Shepard wrote:> When a library is loaded messages such as these are displayed: > > The following object is masked from ?package:base?: > > norm > > The following object is masked from ?package:NADA?: > > cor > > What do I read to understand just what being masked means?I'm not sure if the word "masked" is used, but the R Language Definition manual talks about the scope of variables. The messages say that something just loaded has an object named "norm", and it is hiding the function of that name in the base package. Similarly, you just loaded a function called "cor", so the one in NADA is hidden. (When you loaded NADA you probably got a warning that its "cor" was hiding the one in the stats package. So there are 3 "cor" functions now, and you really need to be careful that you're using the right one.) Duncan Murdoch
And to answer the ?What do I read ...?? question help.search('masked?) returns quite a few things on my system, and the one you want is base::conflicts Search for Masked Objects on the Search Path Then of course ?conflicts Also, having seen those messages, you can do find(?norm?) find(?cor?) -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 9/24/14, 11:22 AM, "Rich Shepard" <rshepard at appl-ecosys.com> wrote:> When a library is loaded messages such as these are displayed: > >The following object is masked from ?package:base?: > > norm > >The following object is masked from ?package:NADA?: > > cor > > What do I read to understand just what being masked means? > >Rich > >______________________________________________ >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.