R/ctx_tree.R
is_ctx_tree.Rd
This function returns TRUE for context trees and FALSE for other objects.
TRUE
FALSE
is_ctx_tree(x)
an R object.
TRUE for context trees.
dts <- c(0, 1, 1, 1, 0, 0, 1, 0, 1, 0) dts_ctree <- ctx_tree(dts, min_size = 1, max_depth = 2) is_ctx_tree(dts_ctree) #> [1] TRUE is_ctx_tree(dts) #> [1] FALSE