Skip to content

Instantly share code, notes, and snippets.

@seankross

seankross/strata.R

Created Jun 7, 2017
Embed
What would you like to do?
library(dplyr)
x <- mtcars %>%
group_by(cyl) %>%
sample_frac(replace = TRUE)
mtcars %>%
group_by(cyl) %>%
summarise(sum = n())
x %>%
group_by(cyl) %>%
summarise(sum = n())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.