Remove NULL elements from a list in R
July 12, 2010 Leave a Comment
If you have a list with NULL elements, the following will remove them:
A[!sapply(A, is.null)]
A is the list. Functions referenced:
Source: R-help
July 12, 2010 Leave a Comment
If you have a list with NULL elements, the following will remove them:
A[!sapply(A, is.null)]
A is the list. Functions referenced:
Source: R-help