take_path: Take path in suffix tree

Description Usage Arguments Value

View source: R/take-path.R

Description

Takes a path in a suffix tree from a given node to a new node determined by the input value.

Usage

1
2
take_path(node, value, save = FALSE, time = NULL, pos = NULL,
  terminal = FALSE, exclude_update = FALSE)

Arguments

node

Object of type node, corresponding to the current node.

value

Name of the (possibly non-existent) target node. Should be a scalar character.

save

Whether to save the journey into the tree.

time

(Numeric scalar) Ignored if save is FALSE; provides the timepoint that should be saved into the tree.

pos

(Integerish scalar) Ignored if save is FALSE; corresponds to the 1-indexed position of the event in the training data (across all sequences).

terminal

(Logical scalar) Whether or not the symbol is a terminal symbol.

exclude_update

(Logical scalar) Whether or not updates should be excluded for this event.

Value

New node reached by taking this path (NA if no valid node found)


pmcharrison/tst documentation built on May 24, 2019, 7:36 a.m.