[R] attach and object masking
Marcin Jaworski
semafory at wp.pl
Wed Dec 20 00:01:13 CET 2006
DEEPANKAR BASU <basu.15 at osu.edu> wrote:
>Hi R users!
>
>I am new to R. When I try to attach a simple dataset using the attach()
>command, I get the following message:
>
>> attach(data1)
>
> The following object(s) are masked from package:base :
>
> write
>
>Can someone tell me what this means? (`write' is the name of a variable
>in the dataset). And, do I need to do do something about this.
Hi,
I guess, you need not to do anything, unless you want to work with the
variable 'write' from dataset you try to attach. But if you do want use
it safely (?), one way is to rename the variable from your dataset, not
to double the name from the package that is already attached (check
out search() to know the pecking order ;) and use ?attach to interprete
the help page for yourself). The package gdata make the renaming process
easier for me.
MJ
More information about the R-help
mailing list