Learn R Programming

plu (version 0.3.0)

get_fun: Find a function

Description

Find a function

Usage

get_fun(fn, default = identity)

Value

A function

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().

Examples

Run this code
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)

Run the code above in your browser using DataLab