Learn R Programming

quanteda (version 0.7.2-1)

encoding: get the encoding of documents in a corpus

Description

Get or set the _encoding document-level metadata field(s) in a corpus.

Usage

encoding(x, drop = TRUE)

encoding(x) <- value

Arguments

x
a corpus object
drop
return as a vector if TRUE, otherwise return a data.frame
value
a character vector or scalar representing the new value of the encoding (see Note)

Details

This function modifies the _encoding value set by metadoc. It is a wrapper for metadoc(corp, "encoding").