Learn R Programming

polmineR (version 0.7.8)

regions: Regions of a CWB corpus.

Description

A coerce-method is available to coerce a partition object to a regions object.

Usage

as.regions(x)

# S4 method for regions as.data.table(x, values = NULL)

Arguments

x

object of class regions

values

values to assign to a column that will be added

Slots

cpos

a two-column data.table that will include a "cpos_left" and "cpos_right" column

corpus

the CWB corpus (character vector length 1)

encoding

the encoding of the CWB corpus (character vector length 1)

Examples

Run this code
# NOT RUN {
use("polmineR")
P <- partition("GERMAPARLMINI", date = "2009-11-12", speaker = "Jens Spahn")
R <- as.regions(P)
encode(R, sAttribute = "foo", values = "Jens")
# }

Run the code above in your browser using DataLab