Also you have to be very careful. e.g.

> BOD
  Time demand
1    1    8.3
2    2   10.3
3    3   19.0
4    4   16.0
5    5   15.6
6    7   19.8
> attach(BOD)
> Time <- Time + 1
> BOD  # oops!  BOD was not changed
  Time demand
1    1    8.3
2    2   10.3
3    3   19.0
4    4   16.0
5    5   15.6
6    7   19.8


On Tue, Sep 22, 2009 at 12:18 AM, hadley wickham <h.wick...@gmail.com> wrote:
>>> From: hadley wickham <h.wick...@gmail.com>
>>>
>>> Don't use attach?
>>
>> Obvously good advice but why?
>
> Philosophically, it's better to be explicit than implicit, and the
> extremely non-local effects of attach can make debugging difficult.
>
> Hadley
>
>
> --
> http://had.co.nz/
>
> ______________________________________________
> R-help@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.
>

______________________________________________
R-help@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.

Reply via email to