% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/assert_package.R
\name{assert_package}
\alias{assert_package}
\title{Check a package installation}
\usage{
assert_package(pkg, fn = NULL, pkg_search = "gtsummary", boolean = FALSE)
}
\arguments{
\item{pkg}{Package required}

\item{fn}{Calling function from the user perspective}

\item{pkg_search}{the package the function will search for a minimum
required version from.}

\item{boolean}{logical indicating whether to return a TRUE/FALSE, rather
than error when package/package version not available.}
}
\value{
Returns NULL or not at all.
}
\description{
The function checks whether a package is installed and returns an error
or \code{FALSE} if not available. If a package search is provided, the function
will check whether a minimum version of a package is required.
}
\examples{
assert_package("gt", boolean = TRUE)
}
