Learn R Programming

polmineR (version 0.7.9)

kwic-class: kwic (S4 class)

Description

S4 class for organizing information for concordance output

Usage

# S4 method for kwic
show(object)

# S4 method for kwic as.data.frame(x)

# S4 method for kwic length(x)

# S4 method for kwic sample(x, size)

# S4 method for kwic enrich(.Object, meta = NULL, table = FALSE)

# S4 method for kwic view(.Object)

Arguments

object

an object of class kwic

x

a kwic-class object

size

integer, the subset size for sampling

.Object

a kwic object

meta

s-attributes (character vector) with metainformation

table

logical, whether to turn cpos data.table into data.frame for output

Slots

metadata

Object of class "character" keeping the s-attributes of the metadata that are to be displayed

left

words to the left

right

words to the right

corpus

the CWB corpus

cpos

the corpus positions

table

Object of class data.frame a table with the relevant information for kwic output

encoding

Object of class character encoding of the corpus

labels

Object of class character

categories

Object of class character

Methods

[

indexing for seeing only some concordances

show

get kwic output

Details

The enrich method is used to generate the actual output for the kwic method. If param table is TRUE, corpus positions will be turned into a data.frame with the concordance lines. If param meta is a character vector with s-attributes, the respective s-attributes will be added as columns to the table with concordance lines.

Examples

Run this code
# NOT RUN {
use("polmineR")
K <- kwic("GERMAPARLMINI", "Integration")
length(K)
K[1]
K[1:5]
# }

Run the code above in your browser using DataLab