Returns the requested table of every group's memory network, stacked,
with a group column first.
Examples
seqs <- list(c("a", "b", "c", "a", "b"), c("a", "b", "c", "a", "b"),
c("x", "b", "d", "x", "b"), c("x", "b", "d", "x", "b"))
by_group <- hon(seqs, group = c("g1", "g1", "g2", "g2"), max_order = 2)
by_group
#> Memory networks by group: 2 groups (g1: 2 sequences, g2: 2 sequences)
#> group path from to count probability from_order to_order
#> g1 a -> b a b 4 1 1 1
#> g1 b -> c b c 2 1 1 1
#> g1 c -> a c a 2 1 1 1
#> g2 b -> d b d 2 1 1 1
#> g2 d -> x d x 2 1 1 1
#> g2 x -> b x b 4 1 1 1
hg_get(by_group, top = 3)
#> group path from to count probability from_order to_order
#> 1 g1 a -> b a b 4 1 1 1
#> 2 g1 b -> c b c 2 1 1 1
#> 3 g1 c -> a c a 2 1 1 1
#> 4 g2 b -> d b d 2 1 1 1
#> 5 g2 d -> x d x 2 1 1 1
#> 6 g2 x -> b x b 4 1 1 1