Functions to build or re-build core objects, or to upgrade earlier versions of these objects to the current format.
build_dfm( x, features, docvars = data.frame(), meta = list(), class = "dfm", ... ) rebuild_dfm(x, attrs) upgrade_dfm(x) build_tokens( x, types, padding = FALSE, docvars = data.frame(), meta = list(), class = "tokens", ... ) rebuild_tokens(x, attrs) upgrade_tokens(x) build_corpus(x, docvars = data.frame(), meta = list(), class = "corpus", ...) rebuild_corpus(x, attrs) upgrade_corpus(x) build_dictionary2(x, meta = list(), class = "dictionary2", ...) rebuild_dictionary2(x, attrs) upgrade_dictionary2(x)
x | an input corpus, dfm, tokens, or dictionary object |
---|---|
features | character for feature of resulting |
docvars | data.frame for document level variables |
meta | list for meta fields |
class | class to be attached to the built object |
... | further objects passed to object metadata |
attrs | a list of attributes to be reassigned |
types | character for types of resulting `tokens`` object |
padding | logical indicating if the |