Re: [R] request: How can we ignore a component of list having no element

2008-10-15 Thread hadley wickham
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 columns

Re: [R] request: How can we ignore a component of list having no element

2008-10-15 Thread Adaikalavan Ramasamy
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

Re: [R] request: How can we ignore a component of list having no element

2008-10-15 Thread Muhammad Azam
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 this, junk -