0
全部, 我似乎無法得到我的陰謀來拉丁曼數據這個閃亮的應用程序。任何幫助將不勝感激。ggplot沒有顯示在閃亮的應用程序
ui.R
library(shiny)
library(ggplot2)
shinyUI(fluidPage(
fluidRow(
sidebarLayout(
sidebarPanel(
selectInput("team","Select Team",choices=levels(teamID)),
sliderInput("year","Include Years in Range",min=1871,max=2014,value=c(1871,2014), sep="")
),
mainPanel(
plotOutput("pitchingplot")
)
)
)
))
server.R
library(dplyr)
library(ggplot2)
library(shiny)
shinyServer(function(input, output) {
Pitching%>%
group_by(input$teamID,yearID)%>%
filter(teamID=input$team,yearID>=input$year[1]& yearID<=input$year[2])
summarise(TotER=sum(ER))
output$pitchingplot<-renderPlot({
g<-ggplot(data=Pitching,aes(x=yearID,y=TotER)) + geom_point(aes(color=input$team))
g
})
})