Re: [Rd] incoherent treatment of NULL

2009-03-23 Thread Wacek Kusnierczyk
Martin Maechler wrote: > > >> more verbously, all NULL objects in R are identical, or as the > >> help page says, there's only ``*The* NULL Object'' in R, > >> i.e., NULL cannot get any attributes. > >> > > WK> yes, but that's not the issue. the issue is that names(x)<- seems

Re: [Rd] incoherent treatment of NULL

2009-03-23 Thread Martin Maechler
> "WK" == Wacek Kusnierczyk > on Mon, 23 Mar 2009 16:11:04 +0100 writes: WK> Martin Maechler wrote: >> >> [.. omitted part no longer relevant ] >> WK> however, the following has a different pattern: >> >> WK> x = NULL WK> dput(x) WK>

Re: [Rd] incoherent treatment of NULL

2009-03-23 Thread Wacek Kusnierczyk
Martin Maechler wrote: > > [.. omitted part no longer relevant ] > > WK> however, the following has a different pattern: > >> > WK> x = NULL > WK> dput(x) > WK> # NULL > WK> names(x) = character(0) > WK> # error: attempt to set an attribute on NULL > >>

Re: [Rd] incoherent treatment of NULL

2009-03-23 Thread Martin Maechler
> "WK" == Wacek Kusnierczyk > on Mon, 23 Mar 2009 10:56:37 +0100 writes: WK> Martin Maechler wrote: >>> "WK" == Wacek Kusnierczyk >>> >>> WK> somewhat related to a previous discussion [1] on how 'names<-' would WK> sometimes modify its argument i

Re: [Rd] incoherent treatment of NULL

2009-03-23 Thread Wacek Kusnierczyk
Martin Maechler wrote: >> "WK" == Wacek Kusnierczyk >> >> > WK> somewhat related to a previous discussion [1] on how 'names<-' would > WK> sometimes modify its argument in place, and sometimes produce a > modified > WK> copy without changing the original, here

Re: [Rd] incoherent treatment of NULL

2009-03-23 Thread Martin Maechler
> "WK" == Wacek Kusnierczyk > on Mon, 23 Mar 2009 09:52:19 +0100 writes: WK> somewhat related to a previous discussion [1] on how 'names<-' would WK> sometimes modify its argument in place, and sometimes produce a modified WK> copy without changing the original, here's ano

[Rd] incoherent treatment of NULL

2009-03-23 Thread Wacek Kusnierczyk
somewhat related to a previous discussion [1] on how 'names<-' would sometimes modify its argument in place, and sometimes produce a modified copy without changing the original, here's another example of how it becomes visible to the user when r makes or doesn't make a copy of an object: x = N