I have a list that starts out like:

r <- list()
r[[3]] <- list(count=1, orderlist=data.frame(count=1, sku="A"))

So r[3] yeilds:

[[1]]
[[1]]$count
[1] 1

[[1]]$orderlist
  count sku
1     1   A

So far so good. Now I want to detect the fact that there is no etry in 1,2, and 
4.

> r[1]
[[1]]
NULL
> is.null(r[1])
[1] FALSE

So how do I detect the NULL at r[1]?

Thank you.

Kevin

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to