meta {quanteda} | R Documentation |
Get or set object metadata
Description
Get or set the object metadata in a corpus, tokens, dfm, or dictionary object. With the exception of dictionaries, this will be corpus-level metadata.
Usage
meta(x, field = NULL, type = c("user", "object", "system", "all"))
meta(x, field = NULL) <- value
Arguments
x |
an object for which the metadata will be read or set |
field |
metadata field name(s); if |
type |
|
value |
new value of the metadata field |
Value
For meta
, a named list of the metadata fields in the corpus.
For meta <-
, the corpus with the updated user-level metadata. Only
user-level metadata may be assigned.
Examples
meta(data_corpus_inaugural)
meta(data_corpus_inaugural, "source")
meta(data_corpus_inaugural, "citation") <- "Presidential Speeches Online Project (2014)."
meta(data_corpus_inaugural, "citation")
[Package quanteda version 4.0.2 Index]