% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{ssample}
\alias{ssample}
\title{Stable Sampling Function}
\usage{
ssample(x, size, replace = FALSE, prob = NULL)
}
\arguments{
\item{x}{Either a vector of one or more elements from which to choose, or a
positive integer.}

\item{size}{Non-negative integer giving the number of items to choose.}

\item{replace}{Should sampling be with replacement?}

\item{prob}{Vector of probability weights for obtaining the elements of the
vector being sampled.}
}
\value{
A vector containing the sampled value(s).
}
\description{
Provides a sampling function useful for dynamic simulations, in
which the length of the input vector may be multiple lengths and
the size of the sample may be 0.
}
\keyword{internal}
