See dplyr::sample_n for details.