Get or set the document names of a corpus, tokens, or dfm object.

docnames(x)

docnames(x) <- value

## Arguments

x the object with docnames a character vector of the same length as x

## Value

docnames returns a character vector of the document names

docnames <- assigns new values to the document names of an object. docnames can only be character, so any non-character value assigned to be a docname will be coerced to mode character.