knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "images/", out.width = "100%" )
The goal of texter is to help simplify text analysis for data professionals who need quick insights into their text data.
This package is in its testing phasing and as not been submitted to CRAN.
The development version from GitHub can be installed with:
# install.packages("devtools") #devtools::install_github("simmieyungie/texter") remotes::install_github("simmieyungie/texter@main") #remove.packages(texter)
This is a basic example which shows you how to solve a common problem:
library(texter) ## basic example code
This will help you extract all the handles tagged in a tweet.
head(unlist(users(doge$text)),5)
The emotions conveyed tweets using sentiment analysis. You have an option to specify details = TRUE (or FALSE). TRUE will return a more robust distribution of sentiments and not just Positive or Negative.
sentimentAnalyzer(doge$text, details = T)
Specifying details = F
sentimentAnalyzer(doge$text, details = F)
Extract the top n words occurring in a text
top_words(word_vec = brexit$content, remove_these = c("london", "since"), size = 10)
Retrieve the frequency of a word from a text.
counter(word_vec = brexit$content, words = c("brexit", "london"))
Retrieve the top 10 positive and negative words. Specify plot = TRUE and a simple bar chart of the words will be created, otherwise you get a dataframe of results.
top_Sentiments(word_vec = brexit$content, plot = F)
top_Sentiments(word_vec = doge$text, plot = T) #You can further customize your plot
Retrieve the top n words occurring in a rows of data containing a certain word
top_words_Retriever(word_vec = brexit$content, word_ret = "brexit", remove_these = c("eu", "rt"), size = 10)
Retrieve top n bigrans occuring in a corpus
top_bigrams(brexit %>% select(content), remove_these = c("tmsnrsegbfvh", "รข"), bigram_size = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.