Reject: Reject

Description Usage Arguments Value See Also Examples

Description

Reject() is the opposite of Filter. Reject applies the negation of the unary predicate function f to each element of x, coercing to logical if necessary, and returns the subset of x for which this gives true. Note that possible NA values are currently always taken as false; control over NA handling may be added in the future.

Usage

1
Reject(f, x)

Arguments

f

a predicate function.

x

a vector.

Value

x filtered where f applies

See Also

Other predicate functionals: All; Any

Examples

1
2
3
# Some examples
Filter(function(x) x < 5, 1:10)
Reject(function(x) x < 5, 1:10)

functools documentation built on May 2, 2019, 5:39 a.m.