启动应用程序时,以下最小的Shiny应用程序无法显示。侧边栏显示,但主面板不显示。我没有收到任何错误消息或警告。该应用程序就挂在那里。
ggplot在控制台中工作。
这必须是控制Shiny和ggplot2之间的接口的环境参数。那是什么尝试将dev.off()设置为无效。有人有建议吗?
ui <- fluidPage(
sidebarPanel(
# client logo
# select trade
selectInput(inputId = "trade",
label = "Trade",
choices = trades,
selected = defaultTrade
)
),
mainPanel(
# performance time series plots
plotOutput(outputId = "tsPlotRev", height = "195px")
)
)
server <- function(input, output) {(
output$tsPlotVol <- renderPlot(
ggplot(data.frame(tsData), aes(x = as.Date(weekDate), y = as.numeric(revenue) / 1000000, color = as.factor(isHist))) +
geom_line() + scale_x_date(date_breaks = "4 week", date_labels = "%y-%W") +
theme(axis.text.x = element_text(angle = 45, hjust = 0.75), legend.position = "none") +
labs(x = NULL, y = "revenue (million USD)")
)
)}
shinyApp(ui = ui, server = server)