Skip to content
Prev 260148 / 398502 Next

subsetting a list of dataframes

Have a look at lapply(). Something like:

entries.with.nrows=lapply(data,function(x)dim(x)[1]>1)

should give you a vector with the elements of the list that you seek marked with TRUE.

This vector can then be used to extract a subset from your list by:

data.reduced=data[entries.with.nrows]

Or similar....


HTH
Jannis

--- Lara Poplarski <larapoplarski at gmail.com> schrieb am Di, 17.5.2011: