Closed XD-DENG closed 8 years ago
get_realtime(id)
works fine for me with or without active users.
> while (TRUE){
+ print(get_realtime(id))
+ Sys.sleep(3)
+ }
active.users
1 120
active.users
1 121
active.users
1 121
Do you try the latest dev version? Can you provide full traceback()
?
Hi Artem, below is the traceback I got.
Just like what happened previously, the error appeared when the site is visited (from "No visitor" status).
> library(RGA)
> while (TRUE){
+ print(get_realtime("******"))
+ Sys.sleep(3)
+ }
Waiting for authentication in browser...
Press Esc/Ctrl + C to abort
Authentication complete.
No results were obtained.
NULL
No results were obtained.
NULL
No results were obtained.
NULL
No results were obtained.
NULL
Hide Traceback
Rerun with Debug
Error in `colnames<-`(`*tmp*`, value = character(0)) :
attempt to set 'colnames' on an object with less than two dimensions
7 stop("attempt to set 'colnames' on an object with less than two dimensions")
6 `colnames<-`(`*tmp*`, value = character(0))
5 build_df(type, data_json)
4 get_data(type = type, query = query, token = token)
3 get_report(type = "realtime", query = query, token = token)
2 get_realtime("103394634")
1 print(get_realtime("******"))
What version are you using? Please try the dev version: devtools::install_github("artemklevtsov/RGA")
.
I'm using latest version 0.2.4 on CRAN, with R 3.2.2 and Mac OS.
Let me try the dev version and check if this bug is still there. Will let you know then.
Tried the dev version and the dev version works well for this function. Good job.
Thank you for the feedback.
I had the same problem, but your dev version works nicely
I tested function
get_realtime
with codes belowIf there is no visitor currently on my website, this code returns
which makes sense (and the while loop keeps running well).
But once these is any visitor, I got error as
I may look into this issue myself later and build a pull request after I figure it out (if I'm lucky enough ;-))