Rdo_locate(object, f = function(x) TRUE, pos_only = TRUE,
lists = FALSE, fpos = NULL, nested = TRUE)object
and position, it is called and the value is returned along with the
position, see Details.lists is
TRUE, see `Details'.lists = FALSE, the function
f is applied to each leave (a character string) of the Rd
object. If lists = TRUE the function f is applied also
to each branch (a list). In this case, argument nested controls
what happens when f returns TRUE. If nested is TRUE,
each element of the list is also inspected recursively, otherwise this
is not done and effectively, the list is considered a leave. If
f does not return TRUE, the value of nested has no
effect and the elements of the list are inspected.
The position of each object for which f returns TRUE is
recorded as a numeric vector.
If fpos is a function, it is applied to each selected element
with two arguments, object and the position, and the result
returned along with the position. In this case argument
pos_only is ignored. If fpos is NULL the action depends
on pos_only.
If pos_only = TRUE, Rdo_locate returns a list of such
vectors (it is not a matrix since the positions of the leaves are, in
general, at different depths).
If pos_only is a function, it is applied to each selected
element and the result returned along with the position.
Argument fpos is more powerful than pos_only but the
latter should be sufficient and simpler to use in most cases.