[1] 2
STAT 220
x
, y
, z
: vectors.w
: a vector of weights.df
: a data frame or tibblei
, j
: numeric indices (typically rows and columns).n
: length, or number of rows.p
: number of columns.ca13-yourusername
repository from Github10:00
Allows code to:
if-else
ifelse()
Neil deGrasse Tyson
tidytext
comes with a database of common stop wordsWhat is the average sentiment of Amazon
shoppers purchasing musical instruments?
reviewerName | reviewText | ratingOverall |
---|---|---|
StormJH1 | i acknowledge that this is a minority opinion perhaps i just had bad luck with my unit and the attempts to repair it afterwards but while i loved the sound and functionality of this wah wah pedal it would literally last me a few months at a time before it became unusable i suspected that the potentiameter was shot so i had that replaced but the same problems reoccurred like a horrible static noise as soon as started using it good product but hopefully they make them more durable than the particular unit i had | 3 |
J. Edgar Mihelic “Skyscraper” | i had put these on and my wife picked my guitar to play and she was confused they do take some time getting used to they do not rip up your hand as much and if you keep your fingers on the strings as you shift there is less friction this is good but it takes some getting used to i used that finger tip friction to let me know where i was on the fretboard with these i found myself over shifting both high and low i like them and they sound nice but i bought some round wounds to replace these when the time comes | 4 |
Nicholas A. Douglas “b4mvfan01” | these pedals are great exclamationmark exclamationmark a friend of mine said i should buy other pedals because these pedals are not manufactured by a very known brand name but i went with my own judgement and i was not disappointed with them i have increased my speed a lot since I have gotten em and i can pedal songs like all nightmare long and beast and the harlot now equals great pedals but it takes time to develop speed so do not think the pedals suck just because you barely get em and you can not go all jason costa on em | 5 |
ChevisN7 | was not expecting much for this price but i was surprised have been using mine now for about months with no problems workmanship seems good does a good job not great of putting equal pressure on the strings but overall it has been a good product i also have a more expensive capo just like this one they look as though they come from the same factory more expensive is not always better | 4 |
musical_instr_reviews %>%
select(reviewText) %>%
unnest_tokens(output = word,
input = reviewText) %>%
anti_join(stop_words) %>%
count(word, sort=TRUE) %>%
top_n(25) %>%
ggplot(aes(fct_reorder(word,n), n)) +
theme_tufte() +
geom_col(fill = "#79CA32") +
xlab(NULL) +
coord_flip() +
ggtitle("Top words in Amazon Musical Instruments Reviews") +
theme(plot.title = element_text(hjust = 0.5, size = 8))
library(wordcloud)
library(reshape2) # for acast function
set.seed(123) # for reproducibility
musical_instr_reviews %>%
select(reviewText) %>%
unnest_tokens(output=word,
input=reviewText) %>%
anti_join(stop_words) %>%
inner_join(get_sentiments("bing")) %>%
count(word, sentiment, sort = TRUE) %>%
acast(word ~ sentiment,
value.var = "n",
fill = 0) %>%
comparison.cloud(colors = c("blue","purple"),
scale = c(2,0.5),
max.words = 100,
title.size = 2)
10:00