Description Usage Arguments Value Examples
Calculates the TermDocumentMatrix for petitions.
1 | petition_term_document_matrix(petitions, column)
|
petitions |
data.frame of petitions |
column |
which column from the petitions to use for the word cloud (e.g. 'body', 'title') |
TermDocumentMatrix the tdm of the given petition column
1 2 3 4 5 6 7 | data(petitions)
petitions <- head(petitions)
petition_body_tdm <- petition_term_document_matrix(petitions, 'body')
petition_title_tdm <- petition_term_document_matrix(petitions, 'title')
petitions$body_and_title <- paste(petitions$body, petitions$title, sep="\n")
petition_body_and_title_tdm <- petition_term_document_matrix(petitions, 'body_and_title')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.