get_fun: Find a function

View source: R/get_fun.R

get_funR Documentation

Find a function

Description

Find a function

Usage

get_fun(fn, default = identity)

Arguments

fn

A function name, either a character string or an unquoted function name, with or without colons.

default

If fn is NULL, the default function is returned. Defaults to identity().

Value

A function

Examples

get_fun(plu_ral)
get_fun(plu::ral)
get_fun("plu_ral")
get_fun("plu::ral")

get_fun(NULL)
get_fun(NULL, default = plu_ral)

plu documentation built on Sept. 24, 2023, 1:08 a.m.