On Mon, 9 Mar 2009, Vadim Ogranovich wrote:
Dear R-users,
How can I detect a NULL in a recursive list?
For a regular list I could use lapply:
lapply(list(x=NULL), is.null)
$x
[1] TRUE
However that doesn't work for structures like list(list(x=NULL)). I tried
rapply but it treats NULL as a
Dear R-users,
How can I detect a NULL in a recursive list?
For a regular list I could use lapply:
> lapply(list(x=NULL), is.null)
$x
[1] TRUE
However that doesn't work for structures like list(list(x=NULL)). I tried
rapply but it treats NULL as a list and discards them:
> rapply(list(a=1, b=
2 matches
Mail list logo