CreateTextAnalysisWidget: Display text analysis output as an 'htmlwidget'

View source: R/createtextanalysiswidget.R

CreateTextAnalysisWidgetR Documentation

Display text analysis output as an htmlwidget

Description

Creates a htmlwidget summary of diagnostic information for a text analysis output from flipTextAnalysis.

Usage

CreateTextAnalysisWidget(
  raw.and.normalized.text,
  n.gram.frequencies,
  token.substitutions,
  footer = "",
  diagnostics = NULL,
  details.expand = "Categories",
  category.examples = NULL
)

Arguments

raw.and.normalized.text

A list containing the raw and normalized text. The first element, called "Original Text", is a character vector of the raw text. The second element, called "Transformed Text", is a list containing the identified phrases for each row. The optional third element, "Row Numbers", contains the row numers of the text. The optional fourth element, "Variable Start Indices", contains the a named numeric vector corresponding to the start indices of each variable in the text.

n.gram.frequencies

A data frame with two variables, the first being the n-gram and the second being the frequencies.

token.substitutions

A character matrix with two columns mapping the old tokens as they appeared in the original text (column 1) to the normalized tokens (column 2).

footer

Character; footer to show at the bottom of the output.

diagnostics

A list containing diagnostic information to be shown in the diagnostic output.

details.expand

String of the name of the detail to expand.

category.examples

Examples for each category, to be displayed in the tooltips.

Value

An htmlwidget containing tables showing the output from a text analysis.

See Also

Box


Displayr/flipFormat documentation built on Feb. 26, 2024, 12:37 a.m.