FunctionList: List of Functions

Description Usage Arguments Extends Slots See Also Examples

Description

A class which is a list of functions. This is a subclass of "HList", and was itself created using the function hlist_class.

Usage

1

Arguments

...

Objects of class function.

Extends

HList

directly

Slots

.Data:

"list"

classtype:

"character" Always equal to "function" in this class.

names:

"character"

See Also

hlist_class, HList,

Examples

1
2
3
4
5
6
flist <- FunctionList(sum = sum, mean=mean)
flist2 <- c(flist, list(max=max))
x <- rnorm(35)
lapply(flist2, function(f) f(x))
# cannot add non-functions to it
try(flist[["foo"]] <- 1)

jrnold/r-checker documentation built on May 20, 2019, 1:04 a.m.