| partition_bundle-class {polmineR} | R Documentation |
Bundle of partitions (partition_bundle class).
Description
Class and methods to manage bundles of partitions.
Usage
## S4 method for signature 'partition_bundle'
show(object)
## S4 method for signature 'partition_bundle'
summary(object, progress = FALSE)
## S4 method for signature 'partition_bundle'
merge(x, name = "", verbose = FALSE)
## S4 method for signature 'partition_bundle'
barplot(height, ...)
## S4 method for signature 'list'
as.partition_bundle(.Object, ...)
## S4 method for signature 'environment'
partition_bundle(.Object)
## S4 method for signature 'partition_bundle'
enrich(.Object, p_attribute, decode = TRUE, verbose = FALSE)
## S4 method for signature 'subcorpus_bundle'
enrich(.Object, p_attribute, decode = TRUE, verbose = FALSE)
flatten(object)
Arguments
object |
A |
progress |
A |
x |
A |
name |
the name for the new partition |
verbose |
A |
height |
height |
... |
further parameters |
.Object |
A |
p_attribute |
A |
decode |
A |
Details
The merge-method aggregates several partitions into one partition. The
prerequisite for this function to work properly is that there are no
overlaps of the different partitions that are to be summarized.
Encodings and the root node need to be identical, too.
The enrich() method will fill the slot stat of the partition
objects within the bundle with a count for the designated p-attributes. If
.Object is a subcorpus_bundle, the output class will be a
partition_bundle.
Value
An object of the class 'partition. See partition for the details on the class.
a partition_bundle object
Slots
objectsObject of class
listthe partitions making up the bundlecorpusObject of class
characterthe CWB corpus the partition is based ons_attributes_fixedObject of class
listfixed s-attributesencodingObject of class
characterencoding of the corpusexplanationObject of class
characteran explanation of the partitionxmlObject of class
characterwhether the xml is flat or nestedcallObject of class
characterthe call that generated thepartition_bundle
Author(s)
Andreas Blaette
Examples
# merge partition_bundle into one partition
gparl <- corpus("GERMAPARLMINI") %>%
split(s_attribute = "date") %>%
merge()
use(pkg = "RcppCWB", corpus = "REUTERS")
pb <- partition_bundle("REUTERS", s_attribute = "id")
barplot(pb, las = 2)
sc <- corpus("GERMAPARLMINI") %>%
subset(date == "2009-11-10") %>%
split(s_attribute = "speaker") %>%
barplot(las = 2)