is_optim_compatible: Check whether a function signature is amenable to...

View source: R/utils-optimization.R

is_optim_compatibleR Documentation

Check whether a function signature is amenable to optimization via stats::optim.

Description

Functions compatible with optim have the parameter named par as their first formal argument where each value is a respective free parameter to be optimized.

Usage

is_optim_compatible(fn)

Arguments

fn

function A non-primitive function.

Value

logical(1) TRUE if the first value of formalArg(fn) is "par", otherwise FALSE.


bhklab/CoreGx documentation built on March 14, 2024, 3:04 a.m.