Learn R Programming

polmineR (version 0.7.4)

textstat-class: S4 textstat class

Description

Superclass for features, context, and partition class.

Usage

# S4 method for textstat
head(x, ...)

# S4 method for textstat tail(x, ...)

# S4 method for textstat dim(x)

# S4 method for textstat nrow(x)

# S4 method for textstat round(x, digits = 2)

# S4 method for textstat colnames(x)

# S4 method for textstat sort(x, by, decreasing = TRUE)

as.bundle(object, ...)

# S4 method for textstat,textstat +(e1, e2)

# S4 method for textstat subset(x, ...)

# S4 method for textstat as.data.table(x)

# S4 method for textstat as.data.frame(x)

# S4 method for textstat [[(x, i)

# S4 method for textstat,ANY,ANY,ANY [(x, i, j)

# S4 method for textstat view(.Object)

Arguments

x

textstat object

...

further parameters

digits

no of digits

by

by

decreasing

logical

object

an object

e1

object 1

e2

object 2

i

vector to index data.table in stat-slot

j

vector to index data.table in stat-slot

.Object

an object

Slots

pAttribute

Object of class "character" p-attribute of the query

corpus

Object of class "character"

stat

Object of class "data.frame" statistics of the analysis

name

name of the object

encoding

Object of class "character" encoding of the corpus

Details

Objects derived from the textstat class can be indexed with simple square brackets ("[") to get rows specified by an numeric/integer vector, and with double square brackets ("[[") to get specific columns from the data.table in the slot stat.

Examples

Run this code
# NOT RUN {
use("polmineR.sampleCorpus")
P <- partition("PLPRBTTXT", text_year = "2009", pAttribute = "word")
y <- cooccurrences(P, query = "Arbeit")
y[1:25]
y[,c("word", "ll")]
y[1:25, "word"]
y[1:25][["word"]]
y[which(y[["word"]] %in% c("Arbeit", "Sozial"))]
y[ y[["word"]] %in% c("Arbeit", "Sozial") ]
# }

Run the code above in your browser using DataLab