Tests whether every code at the finer frame falls entirely within a single code at the coarser frame. Real hierarchies often fail this: a spatial code can straddle two parents, and a reporting classification can assign one detailed class to several aggregates.
scale_nests(x, parent, child)A NestedScale.
Frame names.
TRUE or FALSE. When FALSE, the offending child codes are
attached as the "offenders" attribute.
Nesting is not required by NestedScale – conversion routes through the atom
layer and works either way. This function is a diagnostic.
s <- scale_example()
scale_nests(s, "class", "group") # FALSE - they cross-cut
#> [1] FALSE
#> attr(,"offenders")
#> [1] "GB"