0

When I use the attach() command, I got the below output

The following objects are masked from x (pos = 3)... followed by a list of variables.

What does this mean?

Z.Lin
  • 28,055
  • 6
  • 54
  • 94
  • It means there are already objects with the same names as what you want to attach in your environment. After you use `attach()`, if you call for objects with these same names, R will return the version you just attached, over the previous version (i.e. the old version has been "masked"). See [here](https://stackoverflow.com/questions/39137110/what-does-the-following-object-is-masked-from-packagexxx-mean) & [here](https://stackoverflow.com/questions/29706764/how-to-find-all-attached-data-frames) for similar questions. – Z.Lin Jan 08 '19 at 01:44
  • Possible duplicate of [What does "The following object is masked from 'package:xxx'" mean?](https://stackoverflow.com/questions/39137110/what-does-the-following-object-is-masked-from-packagexxx-mean) – Z.Lin Jan 08 '19 at 01:45
  • In general, you should probably avoid using the `attach` function. – Axeman Jan 08 '19 at 01:55
  • Thanks Z.Lin, it was very helpful and I am clear now. Hello Axeman ! why should one avoid using attach function? I find is very useful than typing object name$variable name. Thanks for you time in posting your answer anyway!! – Kislay Kashyap Apr 06 '20 at 08:33

0 Answers0