Learn R Programming

polmineR (version 0.6.1)

cooccurrences: get all cooccurrences in a partition

Description

get all cooccurrences in a partition

Usage

cooccurrences(.Object, ...)
"cooccurrences"(.Object, window = 5, keep = list(pos = c("NN", "ADJA")), method = "ll", big = FALSE, matrix = FALSE, mc = FALSE, progress = TRUE, verbose = TRUE, ...)
"cooccurrences"(.Object, mc = FALSE, ...)

Arguments

.Object
a partition object
...
further parameters that will be passed into bigmatrix (applies only of big=TRUE)
window
no of tokens to the left and to the right of nodes
keep
list with tokens to keep
method
statistical test to use (defaults to "ll")
big
logical, whether to use bigmatrix
matrix
logical, whether to return matrix
mc
whether to use multicore
progress
logical, whether to be verbose
verbose
logical, whether to be verbose

Value

a cooccurrences-class object

Examples

Run this code
if (require(polmineR.sampleCorpus) && require(rcqp)){
  merkel <- partition("PLPRBTTXT", text_type="speech", text_name=".*Merkel", regex=TRUE)
  merkel <- enrich(merkel, pAttribute="word")
  cooc <- cooccurrences(merkel)
}

Run the code above in your browser using DataLab