Learn R Programming

polmineR (version 0.6.1)

dispersion: Dispersion of a query or multiple queries

Description

The function returns the frequencies of a query or a multiple queries in sub-partitions defined by one or two dimensions. This is a wrapper function, so the output will depend on the number of queries and dimensions provided.

Usage

dispersion(.Object, ...)
"dispersion"(.Object, query, sAttribute, pAttribute = getOption("polmineR.pAttribute"), freq = TRUE, mc = FALSE, progress = TRUE, verbose = FALSE)
"dispersion"(.Object, query, sAttribute, pAttribute = getOption("polmineR.pAttribute"), freq = FALSE, mc = FALSE, progress = TRUE, verbose = TRUE)
"dispersion"(.Object, sAttribute, freq = FALSE)

Arguments

.Object
a partition object
...
further parameters
query
a character vector containing one or multiple queries
sAttribute
a character vector of length 1 or 2 providing the sAttributes
pAttribute
the p-attribute that will be looked up, typically 'word' or 'lemma'
freq
logical, whether to calculate normalized frequencies
mc
logical, whether to use multicore
progress
logical, whether to shop progress
verbose
logical, whether to be verbose

Value

depends on the input, as this is a wrapper function

See Also

crosstab-class

count

Examples

Run this code
if (require(polmineR.sampleCorpus) && require(rcqp)){
  use("polmineR.sampleCorpus")
  test <- partition("PLPRBTTXT", text_year="2009", pAttribute=NULL)
  integration <- dispersion(test, query="Integration", pAttribute="word", sAttribute="text_date")
  integration <- dispersion(test, "Integration", sAttribute=c("text_date", "text_party"))
  integration <- dispersion(test, '"Integration.*"', sAttribute=c("text_year"))
}

Run the code above in your browser using DataLab