Learn R Programming

polmineR (version 0.8.3)

terms: Get terms in partition or corpus.

Description

Get terms in partition or corpus.

Usage

# S4 method for slice
terms(x, p_attribute, regex = NULL, ...)

# S4 method for partition terms(x, p_attribute, regex = NULL, ...)

# S4 method for subcorpus terms(x, p_attribute, regex = NULL, ...)

# S4 method for character terms(x, p_attribute, regex = NULL, robust = FALSE, ...)

Arguments

x

an atomic character vector with a corpus id or partition object

p_attribute

the p-attribute to be analyzed

regex

regular expression(s) to filter results

...

for backward compatibility

robust

logical, whether to check for potential failures

Examples

Run this code
# NOT RUN {
use("polmineR")
session <- partition("GERMAPARLMINI", date = "2009-10-27")
words <- terms(session, "word")
terms(session, p_attribute = "word", regex = "^Arbeit.*")
terms(session, p_attribute = "word", regex = c("Arbeit.*", ".*arbeit"))

terms("GERMAPARLMINI", p_attribute = "word")
terms("GERMAPARLMINI", p_attribute = "word", regex = "^Arbeit.*")
# }

Run the code above in your browser using DataLab