[R] alist()

Duncan Murdoch murdoch at stats.uwo.ca
Mon Nov 6 21:58:18 CET 2006


On 11/6/2006 3:36 PM, Glen Herrmannsfeldt wrote:
> In trying to get NULL members into a list, I found out about alist().
> 
> x<-alist()
> 
> x$one<-1
> x$two<-NULL
> 
> but x$two doesn't exist.
> 
> It seems, though, that an alist is just a list.
> 
> How can one put NULL members into a list?

x <- c(x, list(two=NULL))

Duncan Murdoch



More information about the R-help mailing list