pathway_exists() reports whether a history is itself a context (node)
of the fitted tree, that is, whether it occurred at least min_count
times and, for a pruned tree, survived pruning. A history that is not a
context is still predicted, from its longest suffix in the tree; see
query_pathway().
Examples
tree <- context_tree(trajectories, max_depth = 3)
pathway_exists(tree, "Active -> Disengaged -> Active")
#> [1] TRUE
pathway_exists(prune_tree(tree), "Active -> Disengaged -> Active")
#> [1] FALSE