Learn R Programming

plu (version 0.2.1)

get_fun: 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

Run this code
# NOT RUN {
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