Skip to content
Prev 274447 / 398506 Next

Split a list

On Oct 14, 2011, at 9:26 AM, Weidong Gu wrote:

            
That is certainly true.
Perhaps something like:
list_of_firsts <- lapply(dflist, function(x) X[ , X[,3]=="first"] )
list_of_seconds <- lapply( dflist, function(x) X[ , X[,3]=="second"])

Ow with subset (but without that missing example it is more difficult  
to show the true value of subset:

subset(X, select= X[,3]=="first")
Same as above with an inequality sign.
David Winsemius, MD
West Hartford, CT