简体   繁体   English

和-或使用gtrendsR查询怎么办

[英]and - or query with gtrendsR how to do

I Tried gtrendsR and I found it very usefull. 我尝试了gtrendsR,发现它非常有用。 but I don't know how to do an and/or query. 但我不知道该怎么做和/或查询。 For example with this syntax: 例如,使用以下语法:

library(gtrendsR)
library("ggthemes")
gconnect(usr = "myaddress", psw = "mypassword", verbose = TRUE)
dp2 <- gtrends(c("Petronas", "Castrol", "Fuchs"), geo = c("IT") , start_date = "2013-06-17", end_date = "2016-03-17")
plot(dp2) + ggplot2::ggtitle("Castrol vs Fuchs vs Petronas in Italy") +
scale_colour_solarized("blue") +
theme_fivethirtyeight() +  geom_line(size = 1)

...How can I search Petronas and/or Selenia (they are the same brand of lubricant) but not "Petronas Towers" (not pertinent)? ...我如何搜索国家石油公司和/或Selenia(它们是同一品牌的润滑剂),而不是“ Petronas Towers”(不相关)? In Google trends I would write "Petronas"+"Selenia"-"Petronas Towers". 在Google趋势中,我会写“ Petronas” +“ Selenia”-“ Petronas Towers”。 Is it possible also in gtrendsR? gtrendsR是否也可能?

thanks 谢谢

很简单: 是解决方案

gtrends('"Petronas"+"Selenia"-"Petronas Towers"')$trend

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM