Description Usage Arguments Examples
The fulltexttable
class is a superclass of the traditional data.frame
to
represent the information to show the fulltext of a document (or documents)
as layouted HTML. Rows of a fulltexttable
represent chunks of text
(paragraphs, headlines, blockquotes) that are formatted according to
information defined by the columns of the table. A fulltexttable
has the
following columns:
name: A character
vector, serves as an identifier to distinguish the
content of different documents. Defaults to "", but required to be defined
when different documents are to be combined in one fulltexttable
and
crosstalk is used to filter, or to select documents for display.
element: The HTML element that wraps the tokens of a chunk of text that are formatted according CSS instructions. For ordinary paragraphs, the element 'para' should be used rathen than 'p' to avoid conclicts between (potentially) CSSs.
style: Content of the style attribute of the element. Used at this stage to set the display mode. Defaults to "block" (chunk is displayed), but needs to be "display:none" when crossstalk is used to filter documents, or to make selections.
tokenstream: A list of three-column data.frame
objects that are nested
into the cells of the fulltexttable
. The HTML for fulltext display will be
generated from this data upon calling the annolite HTML widget. Keeping the
fulltext data in the nested data.frame
ensures that data can be changed at
all times.
The fulltexttable()
method is used to construct a fulltexttable
from
different input objects.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | fulltexttable(x, ...)
## S4 method for signature 'subcorpus'
fulltexttable(x, display = "block", name = "")
## S4 method for signature 'partition'
fulltexttable(x, display = "block", name = "")
## S4 method for signature 'plpr_subcorpus'
fulltexttable(x, display = "block", name = "")
## S4 method for signature 'character'
fulltexttable(x, display = "block", element = "para", name = "")
## S4 method for signature 'fulltexttable'
fulltexttable(x, display = "block", element = "para", name = "")
## S4 method for signature 'list'
fulltexttable(x, display = "block", element = "para", name = "")
|
x |
Object to be converted to |
... |
Further arguments defined by methods. |
display |
The initial value of the html style argument. Either "block" or "none". Should usually be "block" by default so that text is displayed. |
name |
A lenght-one |
element |
An element to assign |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | library(polmineR)
use("polmineR")
x <- corpus("REUTERS") %>% subset(id == "127")
tbl <- fulltexttable(x)
p <- partition("REUTERS", id = "127")
fli <- fulltexttable(p)
library(polmineR)
use("polmineR")
x <- corpus("GERMAPARLMINI")
sp <- subset(x, speaker == "Volker Kauder" & date == "2009-11-10")
y <- fulltexttable(sp)
x <- corpus("GERMAPARLMINI")
sp <- subset(x, speaker == "Volker Kauder" & date == "2009-11-10")
y <- fulltexttable(sp)
headline <- fulltexttable(x = c("Volker", "Kauder", "(CDU)"), element = "h2")
y2 <- c(headline, y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.