Learn R Programming

jwutil (version 1.2.3)

invwhich: inverse which

Description

for a given vector of ordinals which would reference items in a vector, list etc, invwhich returns a logical vector with TRUE for the cited positions. If length is not provided, the maximum index is used.

Usage

invwhich(which, len = max(which))

Arguments

which

integer vector of indices, as would be produced by which

len

integer scalar: length of return vector, defaults to max(which)

Value

logical vector of length length