Skip to content
Prev 155062 / 398506 Next

using complete.cases() with nested factors

On Thu, Sep 4, 2008 at 4:19 PM, Ken Knoblauch <ken.knoblauch at inserm.fr> wrote:
I think this is slightly more elegant, and follows the
split-apply-combine strategy:

years <- split(dd, dd$year)
full_years <- Filter(function(df) nrow(df) == 12, years)
do.call("cbind", full_years)

Hadley