components {valaddin}R Documentation

Decompose a firmly applied function

Description

Decompose a firmly applied function (i.e., a function created by firmly):

Usage

firm_core(x)

firm_checks(x)

firm_error(x)

firm_args(x)

Arguments

x

Object to decompose.

Value

If x is a firmly applied function:

In the absence of the component to be extracted, these functions return NULL.

See Also

firmly

Examples

f <- function(x, y, ...) NULL
f_fm <- firmly(f, ~is.numeric, list(~x, ~y - x) ~ {. > 0})

identical(firm_core(f_fm), f)                  # [1] TRUE
firm_checks(f_fm)                              # 4 x 4 data frame
firm_error(f_fm)                               # [1] "simpleError"
firm_args(f_fm)                                # NULL
firm_args(firmly(f_fm, .warn_missing = "y"))   # [1] "y"


[Package valaddin version 1.0.2 Index]