Commit 4ea24c72 authored by Holger Brandl's avatar Holger Brandl

added helper first_group

parent 8109eb7d
......@@ -161,6 +161,7 @@ splat = plyr::splat
shuffle <- function(df) df[sample(nrow(df)),]
first <- function(x, n=1) head(x, n)
first_group = function(x, which=1) x %>% nest %>% slice(which) %>% unnest(data)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment