Skip to content

Commit

Permalink
Ungroup after sample selection
Browse files Browse the repository at this point in the history
  • Loading branch information
tereom committed Sep 27, 2018
1 parent 50af8be commit de6e7e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/select_sample.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ select_sample_prop <- function(sampling_frame, stratum = stratum, frac,
stratum <- dplyr::enquo(stratum)
sample <- sampling_frame %>%
dplyr::group_by(!!stratum) %>%
dplyr::sample_frac(size = frac, replace = replace)
dplyr::sample_frac(size = frac, replace = replace) %>%
dplyr::ungroup()
}
return(sample)
}

0 comments on commit de6e7e6

Please sign in to comment.