Learn R Programming

polmineR (version 0.7.4)

bundle-class: Bundle class

Description

A class to bundle several objects (partition, context, comp, cooccurrences objects) in one S4 object.

Usage

# S4 method for bundle
length(x)

# S4 method for bundle names(x)

# S4 method for bundle,character names(x) <- value

# S4 method for bundle unique(x)

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

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

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

# S4 method for bundle sample(x, size)

# S4 method for list as.bundle(object, ...)

# S4 method for textstat as.bundle(object)

# S4 method for bundle as.data.table(x, col)

# S4 method for bundle as.matrix(x, col)

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

Arguments

x

a bundle object

value

character string with a name to be assigned

e1

object 1

e2

object 2

i

integer to index a bundle object

size

number of items to choose to generate a sample

object

a bundle object

...

further parameters

col

columns of the data.table to use to generate an object

Slots

objects

Object of class "list"

pAttribute

Object of class "character"

encoding

encoding of objects

Examples

Run this code
# NOT RUN {
use("europarl.en")
Ps <- partitionBundle(
  "EUROPARL-EN", sAttribute = "text_year",
  values = sAttributes("EUROPARL-EN", "text_year")
)
Cs <- cooccurrences(Ps, query = "Europe", cqp = FALSE, verbose = FALSE, progress = TRUE)
dt <- as.data.table(Cs, col = "ll")
m <- as.matrix(Cs, col = "ll")
# }

Run the code above in your browser using DataLab