Tin Le Mini Lesson 3

Creating a word cloud

#first install word cloud
library(wordcloud)
## Loading required package: RColorBrewer
#creating a list of words
list= c("Logitech", "Dell", "Nvidia", "Fractal Design", "Phillips", "Apple", "Windows", "AMD", "Intel", "Skylake", "Kabylake", "Ryzen", "IBM", "Andriod", "Google", "Amazon", "Samsung", "Acer", "Asus", "Python", "Programming", "Saint Martins", "Linux", "Explorer", "Chrome", "Raspberry pi", "GitHub", "Mechanical", "Keyboard", "Newegg", "C#", "Visual Studio", "Unity", "Blender", "DataCamp", "GameMaker", "ggplot", "dplyr")

#added frequency to each word on the list
f = sample(seq(0,1,0.01), length(list), replace = TRUE)

#word cloud package will automatically make the worldcloud. 

par(bg = "black") #add black background
wordcloud(list, f, col = terrain.colors(length(list), alpha = 0.8), rot.per = 0.3)
## Warning in wordcloud(list, f, col = terrain.colors(length(list), alpha =
## 0.8), : Visual Studio could not be fit on page. It will not be plotted.