CreateTextTree: 'CreateTextTree' Generate a predictive tree from an outcome...

View source: R/texttree.R

CreateTextTreeR Documentation

CreateTextTree Generate a predictive tree from an outcome variable and a tree.

Description

CreateTextTree Generate a predictive tree from an outcome variable and a tree.

Usage

CreateTextTree(
  tree,
  outcome.variable,
  original.text,
  transformed.text,
  output = "Sankey"
)

Arguments

tree

A tree object.

outcome.variable

The dependent variable used when creating tree.

original.text

A vector containing the source text that was used to create the tree.

transformed.text

A vector containing the processed text.

output

A string indicating how the result should be printed. Options are "Sankey", "Tree", "Text", or "Table". The first three match the output options of CART, and "Table" prints an HTML widget table which shows the outcome variable next to the text. #' @inheritParams CART


NumbersInternational/flipTrees documentation built on Feb. 26, 2024, 6:45 a.m.