Open richfitz opened 10 years ago
We need an accumulate function (possibly call it a fold) and an apply function, and need to do this over the different iterator orders and over children etc, and with the target being a node or being the node data. So that we can do
treeapply(tr, order="post", target="data", function(x) x$foo)
to get all the foo elements out of the tree.
foo
The current implementation is very very basic. Needs to work on subtrees, and allow iteration over at one of three levels:
sub_
rtree
Decide on how naming of output should go (names=TRUE)?
Write methods for dplyr's %.%? Or too silly?
%.%
Something using Rcpp::Function seems worthwhile here. Get this written soon.
We need an accumulate function (possibly call it a fold) and an apply function, and need to do this over the different iterator orders and over children etc, and with the target being a node or being the node data. So that we can do
to get all the
foo
elements out of the tree.The current implementation is very very basic. Needs to work on subtrees, and allow iteration over at one of three levels:
sub_
iterators)rtree
)Decide on how naming of output should go (names=TRUE)?
Write methods for dplyr's
%.%
? Or too silly?