% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sim-utils.R
\name{check_integer_scalar}
\alias{check_integer_scalar}
\title{Validate a scalar integer parameter}
\usage{
check_integer_scalar(x, name, min.val = 1L)
}
\arguments{
\item{x}{Value to check.}

\item{name}{Parameter name (used in the error message).}

\item{min.val}{Minimum allowed value (default 1L).}
}
\value{
\code{as.integer(x)} on success; raises an error otherwise.
}
\description{
Checks that \code{x} is a single finite value coercible to integer and
at least \code{min.val}.  Used by forced-choice \code{sim.data.*}
functions to validate \code{N.person}, \code{N.block}, \code{I.block},
and \code{D}.
}
\keyword{internal}
