[R] Masked from package

Duncan Murdoch murdoch.duncan at gmail.com
Wed Sep 24 20:35:48 CEST 2014


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



More information about the R-help mailing list