Closed jamespmcguire closed 8 years ago
I am getting a vapply error when I run get_ga with both segment and the fetch.by argument:
vapply
get_ga
fetch.by
> get_ga(start.date = "2015-12-01", end.date = "2016-01-31", metrics = "ga:sessions", dimensions = "ga:yearMonth") yearMonth sessions 1 201512 7358148 2 201601 8031525 > get_ga(start.date = "2015-12-01", end.date = "2016-01-31", metrics = "ga:sessions", dimensions = "ga:yearMonth", fetch.by = "month") yearMonth sessions 1 201512 7358148 2 201601 8031525 > get_ga(start.date = "2015-12-01", end.date = "2016-01-31", metrics = "ga:sessions", dimensions = "ga:yearMonth", segment = "gaid::-2") yearMonth sessions 1 201512 3696892 2 201601 3949445 > get_ga(start.date = "2015-12-01", end.date = "2016-01-31", metrics = "ga:sessions", dimensions = "ga:yearMonth", segment = "gaid::-2", fetch.by = "month") Error in vapply(x, function(x) x[[name]], numeric(1)) : values must be type 'double', but FUN(X[[1]]) result is type 'character' > traceback() 5: vapply(x, function(x) x[[name]], numeric(1)) 4: sum_by(pages, "sampleSize") 3: fetch_by(path, query, by, token) 2: get_report("data/ga", query, token, fetch.by) 1: get_ga(start.date = "2015-12-01", end.date = "2016-01-31", metrics = "ga:sessions", dimensions = "ga:yearMonth", segment = "gaid::-2", fetch.by = "month")
Thank you for the report. Error occurs when one of the page have a sampled data,
I am getting a
vapply
error when I runget_ga
with both segment and thefetch.by
argument: