subtree: Extract subtree

View source: R/1b-base-model-function.R

subtreeR Documentation

Extract subtree

Description

Extract subtree

Usage

subtree(object, path)

Arguments

object

an object of class sevt.

path

the path from root after which extract the subtree.

Details

Returns the subtree of the staged event tree, starting from path.

Value

A staged event tree object corresponding to the subtree.

Examples

DD <- generate_random_dataset(4, 100)
model <- sevt(DD, full = TRUE)
plot(model)
model1 <- subtree(model, path = c("-1", "1"))
plot(model1)

stagedtrees documentation built on April 29, 2022, 1:06 a.m.