docvars(x, ...)## S3 method for class 'corpus':
docvars(x, field = NULL, ...)
docvars(x, field = NULL) <- value
docvars(x, field = NULL) <- value
## S3 method for class 'corpusSource':
docvars(x, ...)
docvars
returns a data.frame of the document-level variablesdocvars<-
assigns value
to the named field
head(docvars(inaugCorpus))
docvars(inaugCorpus, "President") <- paste("prez", 1:ndoc(inaugCorpus), sep="")
head(docvars(inaugCorpus))
Run the code above in your browser using DataLab