Re: [Rd] Field initialization order bug?

2007-07-17 Thread Daniel Wilhelm
Thank you all for clarifying that bug in my understanding! I suppose that I expected 'a' to be promoted to a list when indexed from NULL. I will be more judicious in the future when I post. Daniel Wilhelm >On Mon, 16 Jul 2007, Daniel Wilhelm wrote: > >>I believe that I may have found a bug in

Re: [Rd] Field initialization order bug?

2007-07-17 Thread Martin Maechler
PD> Prof Brian Ripley wrote: PBR> On Mon, 16 Jul 2007, Daniel Wilhelm wrote: >>> I believe that I may have found a bug in R. The top code sample gives PBR> You have 'merely' found a bug in your understanding. PBR> What type did you expect 'a' to be? If you expec

Re: [Rd] Field initialization order bug?

2007-07-17 Thread Peter Dalgaard
Prof Brian Ripley wrote: > On Mon, 16 Jul 2007, Daniel Wilhelm wrote: > > >> I believe that I may have found a bug in R. The top code sample gives >> > > You have 'merely' found a bug in your understanding. What type did you > expect 'a' to be? If you expected a list, that is not what ha

Re: [Rd] Field initialization order bug?

2007-07-17 Thread Prof Brian Ripley
On Mon, 16 Jul 2007, Daniel Wilhelm wrote: > I believe that I may have found a bug in R. The top code sample gives You have 'merely' found a bug in your understanding. What type did you expect 'a' to be? If you expected a list, that is not what happens in the first example, and you need a <-

Re: [Rd] Field initialization order bug?

2007-07-17 Thread Duncan Murdoch
Daniel Wilhelm wrote: > I believe that I may have found a bug in R. The top code sample gives > an error as shown. However, by simply switching which field is > initialized first as in the bottom code sample, it works as expected. > > > This gives an error: > > > a <- NULL > a[["field1"]] <- 1 >

[Rd] Field initialization order bug?

2007-07-17 Thread Daniel Wilhelm
I believe that I may have found a bug in R. The top code sample gives an error as shown. However, by simply switching which field is initialized first as in the bottom code sample, it works as expected. This gives an error: a <- NULL a[["field1"]] <- 1 a[["field2"]] <- matrix(c(2,1), 1) Erro