funprog-extra: Additional higher-order functions

Description Usage Arguments Details Value See Also

Description

These functions are aliases for or thin wrappers around the functions in the base R funprog set. The aliases make the functions available under the names that are usual in Lisp/Scheme.

Usage

1
2
3
4
5
6
7
delete.matching(f, x)

reduce(f, x, init, right = FALSE, accumulate = FALSE)

map(f, ...)

keep.matching(f, x)

Arguments

f

A function of the appropriate arity, as in funprog.

x

A vector.

init

As in link{Reduce}.

right

As in link{Reduce}.

accumulate

As in link{Reduce}.

...

As in link{Map}.

Details

The following functions are aliases for functions from base:

The delete.matching function does the opposite of keep.matching and returns only elements of x for which f does not return a logically true value.

Value

delete.matching returns the elements of x for which f is not logically true.

See Also

The functional-programming functions in base, especially Filter, under funprog.


wwbrannon/schemeR documentation built on May 4, 2019, 12:03 p.m.