% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sample_n_by.R
\name{sample_n_by}
\alias{sample_n_by}
\title{Sample n Rows By Group From a Table}
\usage{
sample_n_by(data, ..., size = 1, replace = FALSE)
}
\arguments{
\item{data}{a data frame}

\item{...}{Variables to group by}

\item{size}{the number of rows to select}

\item{replace}{with or without replacement?}
}
\description{
sample n rows by group from a table using the \code{\link[dplyr]{sample_n}()} function.
}
\examples{
ToothGrowth \%>\% sample_n_by(dose, supp, size = 2)
}
