% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods-trainModel.R
\name{.randomSampleIndex}
\alias{.randomSampleIndex}
\title{Generate a random sample from each group}
\usage{
.randomSampleIndex(n, labels, groups)
}
\arguments{
\item{n}{The sample size}

\item{labels}{A \code{vector} of the group labels for all rows of the}

\item{groups}{A vector of group labels for the data to sample from}

\item{numSamples}{The number of samples to take}
}
\value{
A subset of your object with n random samples from each group in
groups. The number of rows returned will equal the number of groups times
the sample size.
}
\description{
Returns a list of equally size random samples from two or more sample
groupings.
}
\keyword{internal}
