I have a list of dataframes, ranging in size. I want to drop those with few rows (lets say <3).
This is what I've been working with so far, for what it's worth:
d1 <- data.frame(y1 = c(1, 2, 3, 9), y2 = c(4, 5, 6, 7))
d2 <- data.frame(y1 = c(3, 2, 1, 6), y2 = c(6, 5, 4, 4))
d3 <- data.frame(y1 = c(3, 2), y2 = c(6, 5))
d4 <- data.frame(y1 = c(3, 2), y2 = c(6, 5))
listdfs <- list(d1, d2, d3, d4)
listdfs2<-lapply(listdfs,function(x) if(nrow<10<-NULL)))
So basically d1 and 2 should be maintained.
Thanks.