Rdo_which: Find elements of Rd objects for which a condition is true
Description
Find elements of Rd objects for which a condition is true.Usage
Rdo_which(rdo, fun)
Rdo_which_tag_eq(rdo, tag)
Rdo_which_tag_in(rdo, tags)
Arguments
fun
a function to evaluate with each element of rdo.
Value
- a vector of positive integers
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.See Also
Rdo_locate which searches recursively the Rd object.Examples
Run this code##---- Should be DIRECTLY executable !! ----
Run the code above in your browser using DataLab