Description Usage Arguments Author(s) Examples
The HTML widget annolite is the core of the package and the annolite()
method is the constructor to generate it. The widget targets two basic uses:
The widget's annotation mode offers a pure R workflow for basic text
annotation tasks. In this scenario, it is used within a Shiny Gadget called
via annotate()
.
The widget's display mode is designed to inspect the fulltext of a document with highlighted annotations either in an interactive R session or embedded in Rmarkdown documents. The widget's support of crosstalk enables the interactive selection among a set of documents within an HTML document generated from Rmarkdown.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | annolite(x, ...)
## S4 method for signature 'fulltexttable'
annolite(
x,
annotations = annotationstable(),
buttons = list(keep = "yellow", drop = "lightgreen"),
width = "100%",
height = NULL,
box = TRUE,
crosstalk = FALSE,
layout = "filter",
group = "fulltext"
)
## S4 method for signature 'SharedData'
annolite(x, annotations = NULL, width = "100%", height = NULL, box = TRUE)
|
x |
Either a |
... |
Further arguments |
annotations |
An optional |
buttons |
To define button/color combinations for annotation mode,
supply a named |
width |
The width of the annolite htmlwidget. |
height |
The height of the annolite htmlwidget. |
box |
Length-one |
crosstalk |
|
layout |
Relevant for crosstalk mode |
group |
An identifier for a Crosstalk group. HTML widgets within one
Crosstalk group can communicate with each other, see documentation of the
argument |
Andreas Blaette
1 2 3 4 5 6 7 8 9 | library(polmineR)
sc <- corpus("GERMAPARLMINI") %>%
subset(speaker == "Volker Kauder" & date == "2009-11-10")
tab <- fulltexttable(sc)
y <- annolite(
x = tab, annotations = annotationstable(),
width = "100%",
buttons = list(keep = "yellow", drop = "orange")
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.