removing NULL elements from a list
Ramon Diaz wrote:
Dear All, I have a list, where several components are NULL, and I'd like to obtain that very same list without the NULL components (i.e., I do not want to unlist or otherwise loose the rest of the list structure). I can do that with a loop, but how could I do it without a loop?
For a list L: L[!sapply(L, is.null)] Uwe Ligges