metacorpus: Get or set corpus metadata

Description Usage Arguments Value Examples

View source: R/corpus-methods-quanteda.R

Description

Get or set the corpus-level metadata in a corpus object.

Usage

1
2
3
metacorpus(x, field = NULL)

metacorpus(x, field) <- value

Arguments

x

a corpus object

field

metadata field name(s); if NULL (default), return all metadata names

value

new value of the corpus metadata field

Value

For metacorpus, a named list of the metadata fields in the corpus.

For metacorpus <-, the corpus with the updated metadata.

Examples

1
2
3
4
metacorpus(data_corpus_inaugural)
metacorpus(data_corpus_inaugural, "source")
metacorpus(data_corpus_inaugural, "citation") <- "Presidential Speeches Online Project (2014)."
metacorpus(data_corpus_inaugural, "citation")

quanteda/quanteda documentation built on Feb. 16, 2019, 5:45 a.m.