% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_error.R
\name{assertions_and_primitives}
\alias{assertions_and_primitives}
\alias{assert}
\alias{assert_is}
\alias{assert_is_one_of}
\alias{assert_is_single_x}
\alias{assert_inherits}
\alias{assert_valid_option}
\alias{is_one_of}
\alias{is_column_subset}
\alias{is_single_character}
\alias{is_single_logical}
\alias{is_single_numeric}
\alias{has_equal_elements}
\alias{has_distinct_elements}
\alias{none}
\title{A set of functions to create standardized error messages}
\usage{
assert(expr, error_msg = "ERROR", ..., warn = FALSE)

assert_is(x, class)

assert_is_one_of(x, classes)

assert_is_single_x(x, class)

assert_inherits(x, class)

assert_valid_option(x, options)

is_one_of(x, classes)

is_column_subset(df1, df2, interger_tolerance = TRUE, factor_tolerance = TRUE)

is_single_character(x)

is_single_logical(x)

is_single_numeric(x)

has_equal_elements(x)

has_distinct_elements(x)

none(..., na.rm = FALSE)
}
\value{
\itemize{
\item The assertions are called for their side effect, they raise warnings or errors
\item The primitives return \code{TRUE} or \code{FALSE}
}
}
\description{
These are internal function for the developers of the package.
The assertions are build on top of \code{\link[=sprintf]{sprintf()}} to handle line breaks and
automate insertion of arguments.
}
\examples{

\dontrun{
assert(FALSE, "My \%s error message!", "nice")
}

}
\author{
Lukas Dargel
}
\keyword{internal}
