This function has been made defunct and replaced.
Use as.character.corpus()
to turn a corpus into a simple named character
vector.
Use corpus_group()
instead of texts(x, groups = ...)
to aggregate texts
by a grouping variable.
Use [<-
instead of texts()<-
for replacing texts in a corpus object.
texts(x, groups = NULL, spacer = " ")texts(x) <- value
For texts
, a character vector of the texts in the corpus.
For texts <-
, the corpus with the updated texts.
for texts <-
, a corpus with the texts replaced by value
a corpus
grouping variable for sampling, equal in length to the number
of documents. This will be evaluated in the docvars data.frame, so that
docvars may be referred to by name without quoting. This also changes
previous behaviours for groups
. See news(Version >= "3.0", package = "quanteda")
for details.
when concatenating texts by using groups
, this will be the
spacing added between texts. (Default is two spaces.)
character vector of the new texts
Get or replace the texts in a corpus, with grouping options.
Works for plain character vectors too, if groups
is a factor.