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 happens in the > first example, and you need > > a <- list() > > or, better, > > a <- vector("list", 2) > > To be precise, you need
a <- vector("list", 2) ; names(a) <- c("field1", "field2") or you end up with a 4-element list. -- O__ ---- Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel