list-utilities: List utilities

Description Usage Arguments Details Value

Description

These functions provide small list- or vector-processing utilities, and in some cases are just aliases for functions in base R. In such cases, the point of the alias is to make the function available under the standard Scheme name.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
cons(...)

reverse(x)

nth(obj, n)

member(x, table)

is.empty(obj)

make.list(n, expr)

Arguments

...

Arguments that cons should pass to c().

x

As in %in% or rev.

obj

An object that is.empty should check the length of.

n

The number of times make.list should replicate its expr argument in building a list.

table

As in %in%.

expr

An object which make.list should replicate in building a list.

Details

cons is an alias for base R's c, nth is an alias for [[, member is an alias for %in%, reverse is an alias for rev and is.empty returns TRUE if and only if its argument is of length 0, returning FALSE otherwise.

make.list returns a list constructed by replicating its expr argument n times. It is equivalent to link{replicate} with simplify=FALSE.

Value

make.list returns the n-length list of replicated expr's. is.empty returns TRUE if its argument is 0-length and FALSE otherwise.


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