Pivot convo structure to have one list element per stub each containing a numeric vector with the level(s) at which that stub appears (as opposed to one list element per level with entries for each stub).
pivot_convo(convo, repeats_only = TRUE)
convo | A |
---|---|
repeats_only | Boolean. Whether to return only stubs which exist in multiple levels |
Named list with one element per stubs (of any level) containing a character vector of all levels at which that stub appears
The main use case for this function is validating that stubs do not appear at
multiple levels. For this reason, the argument repeats_only
defaults to TRUE
and only stubs existing in multiple levels are returned.
#> $b #> [1] 1 2 #> #> $c #> [1] 1 2 3 #> #> $d #> [1] 2 3 #>pivot_convo(convo, repeats_only = FALSE)#> $a #> [1] 1 #> #> $b #> [1] 1 2 #> #> $c #> [1] 1 2 3 #> #> $d #> [1] 2 3 #> #> $e #> [1] 3 #> #> $f #> [1] 3 #>