knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of twitterfeatures is to make it easy to engineer simple features out of Twitter Content.
You can install the development version from GitHub with:
# install.packages("remotes") remotes::install_github("sebastian-fox/twitterfeatures")
This is a basic example. It shows how to create sentiment features from the Tweets using 3 different sentiment dictionaries.
library(twitterfeatures) tweet <- data.frame(status_id = c(1234, 5678), text = c("Everything is great, happy and fantastic", "Bored, sad, tired, grumpy"), stringsAsFactors = FALSE) feature_sentiment(tweet, status_id, text)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.