Description Usage Arguments Details Value Examples
View source: R/feature_engineering.R
Engineers quantitative features in Tweets.
1 | feature_quantitative(data, doc_id_field, text_field)
|
data |
a dataframe or tibble containing the text data and document id |
doc_id_field |
unquoted field name identifying the field within the data that represents the unique document id |
text_field |
unquoted field name identifying the field name in data that contains the text of the Tweet |
The quantitative features are
the count of characters
the number of words
the average word length
the number of sentences
the average number of words in a sentence
A data frame of document ids and their associated quantitative features
1 2 3 4 5 6 | tweets <- data.frame(status_id = c(1234, 5678),
text = c("I love to tweet about one thing #onething #things",
"I have doubts about tweeting about another thing
#another thing #things"),
stringsAsFactors = FALSE)
feature_quantitative(tweets, status_id, text)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.