This is just a little code I have worked on in my short time with R
Before you run this code, be sure to install all of the libraries
#install these libraries
rm(list=ls())
installed.packages("twitteR")
install.packages("dplyr")
install.packages("ggplot2")
install.packages("wordcloud")
install.packages("RColorBrewer")
install.packages("tm")
install.packages("SnowballC")
install.packages("RSentiment")
install.packages("igraph")
install.packages()
library(dplyr)
library(plyr)
library(twitteR)
library(ROAuth)
library(wordcloud)
library(tm)
library(igraph)
library(ggplot2)