shikharanideo / google-motion-charts-with-r

Automatically exported from code.google.com/p/google-motion-charts-with-r
0 stars 0 forks source link

GoogleVis in R: Motion chart not loading in the browser. Getting blank browser. #31

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Used built-in R dataset 'ChickWeight'
2. Installed RJSONIO and googleVis packages.
3. ChickWeight1<-ChickWeight[1:24,] //reduced the number of rows
4. visualization1<-gvisMotionChart(ChickWeight1,idvar='weight',timevar='Time')
5. Got a Warning Message.  Not sure if warning message is related.    

Warning message:
In if (class(x[[.x]]) == "Date") as.character(x[[.x]]) else x[[.x]] :
  the condition has length > 1 and only the first element will be used

6. plot(visualization1)

I expected a motion chart, but I just got a blank browser.  I also tried 
converting the 'Time' column from a numeric to date class, but no luck.    

What version of the product are you using? On what operating system?
3.0.2, Mac OS X version 10.6.8.  I also ran the the same code on my work 
Windows laptop, but no luck.

Please provide any additional information below.

Original issue reported on code.google.com by ericki...@gmail.com on 12 Jan 2014 at 7:41

GoogleCodeExporter commented 8 years ago
I think you run into this problem as you data set doesn't make much sense. For 
each id (you use weight here) there is only one time point.

Original comment by markus.g...@googlemail.com on 18 Feb 2014 at 8:42

GoogleCodeExporter commented 8 years ago
Try instead: 
plot(gvisMotionChart(ChickWeight,idvar='Chick',timevar='Time'))

Original comment by markus.g...@googlemail.com on 18 Feb 2014 at 10:01