[R] alist()

gah5 at comcast.net gah5 at comcast.net
Mon Nov 6 22:26:38 CET 2006

Peter Dalgaard <p.dalgaard at biostat.ku.dk> wrote:
(regarding adding NULL elements to a list)

> > x["two"] <- list(NULL)

This seems to work. 

In the actual case, it is assigning from a variable that may 
or may not be null, 
for example:


It seems to work, and not do what it looks like, add a list of
length one.   I suppose I should realize by now that scalars
are just like lists of length one, but this still wasn't obvious.


-- glen

More information about the R-help mailing list