我有我的数据集,挪威下面的代码,GoogleVis上闪亮R中
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)
})
})
它不给我一个错误,但它不绘制运动图。请告诉我这段代码有什么问题。
什么是Det? ... – jdharrison 2014-10-08 20:59:47
这是我的数据表。 – user3439050 2014-10-08 21:54:11