build_uniparam_fn: Build a uniparameter-friendly function

View source: R/builder_functions.R

build_uniparam_fnR Documentation

Build a uniparameter-friendly function

Description

If fn is NULL, get_prefixed_dist_fn will be called to get an function. This is then converted to a uniparameter-friendly version that calls build_uniparam_args internally so it can then call do.call.

Usage

build_uniparam_fn(prefix, dist_name, fn = NULL)

Arguments

prefix

The prefix (generally one of p, q, r or d).

dist_name

The name of the distribution.

fn

If not NULL, will override the result of calling get_prefixed_dist_fn with prefix and dist

Value

A uniparameter version of the input function.

Examples

uniparam_pnorm <- build_uniparam_fn("p", "norm")
uniparam_pnorm(0, list(mean = 0, sd = 1))

PaulMTeggin/practechniques documentation built on Aug. 19, 2023, 4:44 p.m.