[R] help in attach function

Duncan Murdoch murdoch at stats.uwo.ca
Thu Apr 8 14:03:26 CEST 2010


On 07/04/2010 4:24 PM, Changbin Du wrote:
> Hi, r-community,
> 
> This morning, I MET the following problem several times when I try to attach
> the data set.
> 
> When I closed the current console and reopen the R console, the problem
> disappear. BUt with the time passed on, the problem occurs again.
> 
> Can anyone help me with this?
> 
>> attach(total)
> 
>     The following object(s) are masked from total ( position 3 ) :
> 
>      acid base cell_evalue cell_hit charged freq_cell freq_hypo freq_intra
> gene_id gene_name hydrophobic hypo_evalue hypo_hit log_cell log_hypo
> log_pfam num_cell num_genes operon_id outcome pfam_align pfam_evalue
> pfam_per_id polar position target total_length

It appears you are attaching it multiple times, and never detaching it. 
  So the most recent one masks an earlier one.

This is a very easy error to make, which is one reason I always 
discourage this kind of use of attach().  (There are other common errors 
associated with it too.  Just don't use it.)

Duncan Murdoch



More information about the R-help mailing list