This function returns the sequence represented by the node
object.
Arguments
- node
a
ctx_node
object as returned byfind_sequence()
- reverse
specifies whether the sequence should be reported in reverse temporal order (
TRUE
) or in the temporal order (FALSE
). Defaults to the order associated to thectx_node
which is determined by the parameters of the call tocontexts()
orfind_sequence()
.
Examples
dts <- c("A", "B", "C", "A", "A", "B", "B", "C", "C", "A")
dts_tree <- ctx_tree(dts, max_depth = 3)
res <- find_sequence(dts_tree, "A")
as_sequence(res)
#> [1] "A"