Question: install.packages ( ' gtrendsR ' ) library ( ' gtrendsR ' ) MLB = gtrends ( MLB , time = 2 0

install.packages('gtrendsR')
library('gtrendsR')
MLB=gtrends("MLB", time ="2014-01-012019-12-31")
MLB$interest_over_time
MLB$interest_over_time$hits
MLB$interest_over_time$date
max(MLB$interest_over_time$hits)
which.max(MLB$interest_over_time$hits)
MLB$interest_over_time$date[70]
which.min(MLB$interest_over_time$hits)
MLB$interest_over_time$date[25]
sum(MLB$interest_over_time$hits)
plot(as.Date(MLB$interest_over_time$date),
MLB$interest_over_time$hits, type ='l')(a). What is the total number of months from January 2014 to December 2019 when NBA is more popular (in terms of hits) than MLB?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!