fulltexttable: Generate fulltexttable

Description Usage Arguments Examples

Description

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:

Usage

 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 = "")

Arguments

x

Object to be converted to fulltexttable. Can be a character vector with tokens of a chunk of text, or a list of character vectors representing chunks. Alternatively, objects used in the polmineR package can be processed (subcorpus, partition, plpr_subcorpus).

...

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 character vector assigned to column "name" of fulltexttable. Used as name attribute of elements wrapping chunks of text to make selections between different documents. Defaults to "" as it will not be used unless crosstalk is used to skip through documents.

element

An element to assign

Examples

 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)

PolMine/annolite documentation built on Dec. 31, 2020, 4:18 p.m.