% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{fail_on_missing_package}
\alias{fail_on_missing_package}
\title{Check if R package can be loaded and fails loudly otherwise}
\usage{
fail_on_missing_package(pkg, min_version, call = NULL)
}
\arguments{
\item{pkg}{string}

\item{min_version}{optional minimum version needed}

\item{call}{Call to include in error message.}
}
\description{
Check if R package can be loaded and fails loudly otherwise
}
\examples{
f <- function() fail_on_missing_package("foobar")
try(f())
g <- function() fail_on_missing_package("stats")
g()
}
