Description Usage Arguments Format Methods Author(s) See Also Examples
CSourceQ
Sources a Corpus object from a Quanteda object.
1 |
name |
Optional character vector indicating name for Corpus object. |
x |
Character vector or a list of character vectors containing text. |
An object of class R6ClassGenerator
of length 24.
new(x, name = NULL)
Initializes an object of the CSourceQ class.
source()
Executes the process of sourcing the Corpus object.
John James, jjames@datasciencesalon.org
Other Corpus Source Classes: CSource0
,
CSourceDir
, CSourceFileSet
,
CSourceTM
, CSourceV
1 2 3 4 5 6 7 8 9 10 11 | text <- c("The firm possesses unparalleled leverage in Washington,
thanks in part to its track record of funneling executives into
senior government posts. Even the Trump administration, which
rode a populist wave to electoral victory, is stocked with
Goldman alumni, including Treasury Secretary Steven Mnuchin and
the departing White House economic adviser Gary D. Cohn.",
"Goldman is also an adviser to many of America’s — and the
world’s — largest companies, ranging from stalwarts like Walt
Disney to upstarts like Uber.")
corpus <- CSource$new(x = txt, name = "Goldman")$vector()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.