Description Usage Arguments Value Examples
Prepare a corpus data.frame for inclusion in the textcorpus package.
1 2 | prepare_textcorpus_data(x, corpus.cols = c("id", "author", "text"),
meta = NULL, ...)
|
x |
The main corpus data set. |
corpus.cols |
The corpus columns found in |
meta |
The optional meta data set. |
... |
ignored. |
Returns a list of a main corpus text data and meta data with a matching 'id' key.
1 2 3 4 5 6 7 8 9 10 11 12 13 | library(dplyr)
library(stringi)
corp <- data_frame(
id = stri_rand_strings(10, 10),
author = c('sam', 'cal', 'sue', 'bob', 'sal', 'pam', 'pat', 'joe', 'arr', 'nmr'),
text = stri_rand_lipsum(10),
state = state.name[1:10],
month = month.name[1:10]
)
prepare_textcorpus_data(corp)
prepare_textcorpus_data(corp, corpus.cols = c('id', 'author', 'text', 'state'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.