I needed a way to easily sample rows from a data.frame with different fractions per class (as opposed to dplyr::sample_frac()
that only supports a single fraction). So I wrote this little function below.
I needed a way to easily sample rows from a data.frame with different fractions per class (as opposed to dplyr::sample_frac()
that only supports a single fraction). So I wrote this little function below.