Hello, I am trying to embed a googleVis motion chart in my shiny app using renderGvis() and htmlOutput(). I want the chart to open in a tab inside my app and not in another browser, but I get an error message. Here are my ui.R and server.R codes:
UI.R:
tabPanel(h4("GoogleVis",style="color:green"),
mainPanel(htmlOutput("google"),actionButton("click","Animate Plot")))
Server.R:
output$google<-renderGvis({
input$click
data<-read.csv("chart.csv",sep=",",header=TRUE)
isolate(chart<-gvisMotionChart(data,idvar="country",timevar="year",xvar="GDP",
yvar="expectancy"))
isolate(plot(chart))
})
And then I get the following error message when I try to run the app:
Warning: Error in $: $ operator is invalid for atomic vectors
77: paste
76: output$google
1: shiny::runApp
I will really appreciate your advice. Thanks