Crandore Hub

rollupTree

Perform Recursive Computations

Mass rollup for a Bill of Materials is an example of a class of computations in which elements are arranged in a tree structure and some property of each element is a computed function of the corresponding values of its child elements. Leaf elements, i.e., those with no children, have values assigned. In many cases, the combining function is simple arithmetic sum; in other cases (e.g., mass properties), the combiner may involve other information such as the geometric relationship between parent and child, or statistical relations such as root-sum-of-squares (RSS). This package implements a general function for such problems. It is adapted to specific recursive computations by functional programming techniques; the caller passes a function as the update parameter to rollup() (or, at a lower level, passes functions as the get, set, combine, and override parameters to update_prop()) at runtime to specify the desired operations. The implementation relies on graph-theoretic algorithms from the 'igraph' package of Csárdi, et al. (2006 <doi:10.5281/zenodo.7682609>).

Versions across snapshots

VersionRepositoryFileSize
0.4.1 rolling linux/jammy R-4.5 rollupTree_0.4.1.tar.gz 268.4 KiB
0.4.1 rolling linux/noble R-4.5 rollupTree_0.4.1.tar.gz 268.2 KiB
0.4.1 rolling source/ R- rollupTree_0.4.1.tar.gz 398.4 KiB
0.4.1 latest linux/jammy R-4.5 rollupTree_0.4.1.tar.gz 268.4 KiB
0.4.1 latest linux/noble R-4.5 rollupTree_0.4.1.tar.gz 268.2 KiB
0.4.1 latest source/ R- rollupTree_0.4.1.tar.gz 398.4 KiB
0.4.1 2026-04-26 source/ R- rollupTree_0.4.1.tar.gz 398.4 KiB
0.4.1 2026-04-23 source/ R- rollupTree_0.4.1.tar.gz 398.4 KiB
0.4.1 2026-04-09 windows/windows R-4.5 rollupTree_0.4.1.zip 272.4 KiB
0.3.1 2025-04-20 source/ R- rollupTree_0.3.1.tar.gz 397.5 KiB

Dependencies (latest)

Imports

Suggests