Skip to content
Prev 342805 / 398506 Next

Extract particular months from List in R

Great! Thanks very much Uwe.
AT.
On Sunday, August 3, 2014 2:12 PM, Uwe Ligges <ligges at statistik.tu-dortmund.de> wrote:

        
On 03.08.2014 21:23, Zilefac Elvis wrote:
[SNIP]

If your data is in an object "dat", then:


lapply(dat, function(x) x[x[["Month"]] %in% 6:8,])

or in order to combine into one data.frame:

do.call("rbind", lapply(dat, function(x) x[x[["Month"]] %in% 6:8,]))




Best,
Uwe Ligges