Retrieve full text for the subcorpora or
partition objects in a
partition_bundle and generate a
VCorpus-class object from the
## S4 method for signature 'partition_bundle' as.VCorpus(x)
VCorpus class of the
tm-package offers an interface to
access the functionality of the
tm-package. Note however that
VCorpus to get a
DocumentTermMatrix, or a
TermDocumentMatrix is a highly inefficient detour. Applying the
as.TermDocumentMatrix methods on a
partition_bundle is the recommended approach.
tm-package has been loaded, the
included in the
polmineR-package may become inaccessible. To deal with
this (propable) scenario, it is possible to use a coerce-method
as(YOUROBJECT, "VCorpus")), see examples.
use(pkg = "RcppCWB", corpus = "REUTERS") pb <- corpus("REUTERS") %>% partition_bundle(s_attribute = "id") vc <- as.VCorpus(pb) # works only, if tm-package has not yet been loaded vc <- as(pb, "VCorpus") # will work if tm-package has been loaded, too vc <- corpus("REUTERS") %>% split(s_attribute = "id") %>% as("VCorpus")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.