[R] list of lists, is this element empty

Rui Barradas
2014-12-20T16:20:26Z

Hello,

Your list seems to have only 2 elements. You can check this with

length(x)

Or you can try

lapply(x, is.null)

Hope this helps,

Rui Barradas

Em 20-12-2014 15:58, Ragia Ibrahim escreveu:
> Hello,
> Kindly I have a list of lists as follow
> x
> [[1]]
> [1] 7
>
> [[2]]
> [1] 3 4 5
>
> as showen x[[3]] does not have a value and it has NULL, how can I check on
this
> how to test if x[[3]] is empty.
>
> thanks in advance
> Ragia