Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when no results returned. #63

Open
pugzor opened this issue Jan 2, 2015 · 1 comment
Open

Error when no results returned. #63

pugzor opened this issue Jan 2, 2015 · 1 comment

Comments

@pugzor
Copy link

pugzor commented Jan 2, 2015

Hi,

When attempting to add a date filter in some lines return a null value, which I think is causing the following error:

Run (1/466): for date 2013-09-24
Error in if (nrow(ga.data$rows) < ga.data$totalResults && (messages ||  : 
  missing value where TRUE/FALSE needed

For reference, my query looks like the following:

mydata9999 <- ga$getData(ids = "ga:xxxxxxxx", batch = TRUE, walk = TRUE, start.date =
"2013-09-24", end.date = "2015-01-02", metrics =
"ga:pageviews,ga:uniquePageviews,ga:sessions,ga:users,ga:bounces", dimensions =
"ga:yearMonth,ga:userType", filter = "ga:yearMonth=~^20(1412|1411|1312)")

Is this a bug or just me being retarded? The query seems to run fine when using other filters.

@toncek87
Copy link

you can try:

tryCatch({
mydata9999 <- ga$getData(ids = "ga:xxxxxxxx", batch = TRUE, walk = TRUE, start.date =
"2013-09-24", end.date = "2015-01-02", metrics =
"ga:pageviews,ga:uniquePageviews,ga:sessions,ga:users,ga:bounces", dimensions =
"ga:yearMonth,ga:userType", filter = "ga:yearMonth=~^20(1412|1411|1312)")
}, error=function(e){})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants