Data set i am using is shown below. It is a csv file.
Date Subject val1 val2 val3
2010-05-01 12 -0.6155 0.5083 2.6286
2010-06-03 13 0.96416 0.785 1.41
2010-07-01 14 0.9578 1.258 0.579
2010-08-01 15 1.249 1.879 0.268
I am trying to visualize the data be gvisMotionchart.
My code is:-
test_motionchart<-read.csv("data.csv")
test_motion=gvisMotionChart(test_motionchart,idvar="Subject",timevar="Date")
After executing this code i get error message which says
Error in testTimevar(x[[options$data$timevar]], options$data$date.format) :
The timevar has to be of numeric or Date format. Currently it is factor
Any help to get out of this.
Thanks in advance