Find elements of Rd objects for which a condition is true

Share:

Description

Find elements of Rd objects for which a condition is true.

Usage

1
2
3
4
5
Rdo_which(rdo, fun)

Rdo_which_tag_eq(rdo, tag)

Rdo_which_tag_in(rdo, tags)

Arguments

rdo

an Rd object.

fun

a function to evaluate with each element of rdo.

tag

a character string.

tags

a character vector.

Details

These functions return the indices of the (top level) elements of rdo which satisfy a condition.

Rdo_which finds elements of rdo for which the function fun gives TRUE.

Rdo_which_tag_eq finds elements with a specific Rd_tag.

Rdo_which_tag_in finds elements whose Rd_tag's are among the ones specified by tags.

Value

a vector of positive integers

Author(s)

Georgi N. Boshnakov

See Also

Rdo_locate which searches recursively the Rd object.

Examples

1
##---- Should be DIRECTLY executable !! ----

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.