A synthetic 3-frame hierarchy used in examples and tests. It deliberately reproduces three awkward features of real classification tables:
scale_example()A NestedScale with 7 atoms and frames sector/class/group/unit.
a code ("G1") reused at more than one frame, so bare codes are ambiguous
and every lookup must name its frame;
a non-nesting pair of frames – group "GB" draws units from two
different classes, so class and group do not form a tree;
a unit ("OTH") with no code at any coarser frame (partial coverage).
s <- scale_example()
s
#> NestedScale: example
#> Description: Synthetic example: reused code, non-nesting frame pair, and an unassigned atom
#> Frames (4, coarsest first):
#> - sector (2) [1 unit unassigned]
#> - class (3) [1 unit unassigned]
#> - group (3) [1 unit unassigned]
#> - unit (7)
#> Atoms: 7
#> Weights: size, count (default: size)
scale_nests(s, "class", "group") # FALSE - they cross-cut
#> [1] FALSE
#> attr(,"offenders")
#> [1] "GB"