This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
library(gtrendsR)
## Warning: package 'gtrendsR' was built under R version 4.4.3
trend <- gtrends(keyword = c("Shopee", "Tokopedia", "Bukalapak"), geo = "ID", time = "today 12-m")
You can also embed plots, for example:
plot(trend)
summary(trend$interest_over_time)
## date hits keyword geo
## Min. :2024-05-26 Min. : 1.00 Length:159 Length:159
## 1st Qu.:2024-08-25 1st Qu.: 2.00 Class :character Class :character
## Median :2024-11-24 Median : 27.00 Mode :character Mode :character
## Mean :2024-11-24 Mean : 36.58
## 3rd Qu.:2025-02-23 3rd Qu.: 78.00
## Max. :2025-05-25 Max. :100.00
## time gprop category
## Length:159 Length:159 Min. :0
## Class :character Class :character 1st Qu.:0
## Mode :character Mode :character Median :0
## Mean :0
## 3rd Qu.:0
## Max. :0
Note that the echo = FALSE parameter was added to the
code chunk to prevent printing of the R code that generated the
plot.