GoogleVis on shiny in R -
GoogleVis on shiny in R -
i have next code info set, det,
ui.r
library(googlevis) library(shiny) shinyui(fluidpage( titlepanel("visualization tool"), sidebarlayout( #headerpanel('data selection'), sidebarpanel( selectinput('x', 'x variable', choices = c("demand", "capacityweek", "esttotal", "newtotal")), selectinput('y', 'y variable', choices = c("demand", "capacityweek", "esttotal", "newtotal")), selectinput('w', 'size', choices = c("demand", "capacityweek", "esttotal", "newtotal")), selectinput('z', 'colour', choices = c("physician","nurse practioner")), daterangeinput("date", label = h3("date range")) ), mainpanel( htmloutput("plot") ) ) ) ) server.r
library(shiny) library(googlevis) shinyserver(function(input, output){ datasetinput <- reactive({det[det$position %in% input$position,]}) output$chart <- renderplot({ m <- gvismotionchart(det, idvar="clinic", timevar="date", xvar=input$x, yvar=input$y, colour=input$z, sizevar=input$w) plot(m) }) }) it doesn't give me error not plotting motion chart. please kindly tell me what's wrong code.
you need utilize rendergvis instead of renderplot in server.r file.
r shiny googlevis
Comments
Post a Comment