The motion chart appeared well on my own computer although the chart shows up on the other IE window instead of RStudio's internal window. However, when I used the R Shiny server in order to deploy the googleVis motion chart on web, this error message shows:
Error: $ operator is invalid for atomic vectors
I also checked them using the commands below and it shows they are not atomic:
>is.recursive(Fruits)
[1] TRUE
>is.atomic(Fruits)
[1] FALSE
Reproducible code is as below, I've simplifed it and use the internal data "fruit" to demo it; the problem is still there, the motion chart did not show in the same window but appear in another window in IE9. And when deployed using shiny-server, it become worses, motion chart did not appear at all and shows the same error message
Server. R
library(googleVis)
library(shiny)
shinyServer(function(input, output) {
output$motionchart2 <- renderGvis({
M1 <- gvisMotionChart(Fruits, idvar="Fruit", timevar="Year")
plot(M1)
})
})
UI.R
library(shiny)
library(googleVis)
shinyUI(fluidPage(
titlePanel("Analysis"),
mainPanel(
navlistPanel(
tabPanel("MotionChart",h1("Motion Chart"),tableOutput("motionchart2"))
)
)
)
)