% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils-optimization.R
\name{is_optim_compatible}
\alias{is_optim_compatible}
\title{Check whether a function signature is amenable to optimization via \code{stats::optim}.}
\usage{
is_optim_compatible(fn)
}
\arguments{
\item{fn}{\code{function} A non-primitive function.}
}
\value{
\code{logical(1)} \code{TRUE} if the first value of \code{formalArg(fn)} is "par",
otherwise \code{FALSE}.
}
\description{
Functions compatible with \code{optim} have the parameter named \code{par} as their
first formal argument where each value is a respective free parameter to
be optimized.
}
