Learn R Programming

polmineR (version 0.7.9)

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, ...)

# S4 method for partition dispersion(.Object, query, s_attribute, cqp = FALSE, p_attribute = getOption("polmineR.p_attribute"), freq = FALSE, mc = FALSE, progress = TRUE, verbose = FALSE, ...)

# S4 method for character dispersion(.Object, query, s_attribute, cqp = is.cqp, p_attribute = getOption("polmineR.p_attribute"), freq = FALSE, mc = FALSE, progress = TRUE, verbose = TRUE, ...)

# S4 method for hits dispersion(.Object, s_attribute, freq = FALSE, verbose = TRUE, ...)

Arguments

.Object

a partition object

...

further parameters

query

a character vector containing one or multiple queries

s_attribute

a character vector of length 1 or 2 providing the s-attributes

cqp

if logical, whether the query is a CQP query (TRUE/FALSE), if it is a function that is passed in, the function will be applied to the query to guess whether query is a CQP query

p_attribute

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
# NOT RUN {
use("polmineR")
test <- partition("GERMAPARLMINI", date = ".*", p_attribute = NULL, regex = TRUE)
integration <- dispersion(
  test, query = "Integration",
  p_attribute = "word", s_attribute = "date"
)
integration <- dispersion(test, "Integration", s_attribute = c("date", "party"))
integration <- dispersion(test, '"Integration.*"', s_attribute = "date", cqp = TRUE)
# }

Run the code above in your browser using DataLab