Try
x[ !sapply(x, is.null) ]
hadley wickham wrote:
An alternative approach would be to store 0 x 0 matrices instead of
NULLs. This way every object in your list is a consistent type.
Hadley
On Wed, Oct 15, 2008 at 5:23 AM, Muhammad Azam <[EMAIL PROTECTED]> wrote:
Dear friends
There
An alternative approach would be to store 0 x 0 matrices instead of
NULLs. This way every object in your list is a consistent type.
Hadley
On Wed, Oct 15, 2008 at 5:23 AM, Muhammad Azam <[EMAIL PROTECTED]> wrote:
> Dear friends
> There is a list of arrays comprising different no of rows and colu
Dear Mahbub
Thanks a lot for the help.
- Original Message
From: Mahbub Latif <[EMAIL PROTECTED]>
To: Muhammad Azam <[EMAIL PROTECTED]>
Sent: Wednesday, October 15, 2008 12:30:13 PM
Subject: Re: [R] request: How can we ignore a component of list having no
element
try
Dear friends
There is a list of arrays comprising different no of rows and columns even
sometimes NULL, such as [[2]] given below. How can we ignore [[2]] or others
like this in the complete list. Any help in this regard is needed. Thanks
[[1]]
[,1] [,2]
[1,]31
[2,]3
4 matches
Mail list logo