[R] Working around 256 byte variable names? + trouble opening large file

Gabor Grothendieck ggrothendieck at gmail.com
Tue Sep 22 06:33:26 CEST 2009


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.wickham at gmail.com> wrote:
>>> From: hadley wickham <h.wickham at 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 at 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.
>




More information about the R-help mailing list