我正在使用rga库使用Google AnalyticsAPI for R.我想通过最大结果传递1000行限制:
result <- ga$getData(id, start.date="2014-09-01", end.date="2014-09-30", metrics = "ga:pageviews",dimensions = "ga:pagePath,ga:previousPagePath",sort = "-ga:pageViews",filters = "ga:pagePath=~.html;ga:previousPagePath=~operating_system", max-results = 10000)
但是我收到以下错误:
Error: unexpected '='
答案 0 :(得分:3)
这个图库映射了&#39; max&#39;到最大结果&#39;在Google API中 - 尝试更改&#39; max-results&#39;到了&#39; max&#39;。
相关库代码: https://github.com/skardhamar/rga/blob/1e0b06a03274ad57058724eaf95ad285264fc5c1/R/core.R
Google AnalyticsAPI(注意,没有&#39; max&#39; param): https://developers.google.com/analytics/devguides/reporting/core/v3/reference
答案 1 :(得分:0)