当我运行以下app.R
文件时,一切运行正常。
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(title = "Basic dashboard"),
dashboardSidebar(),
dashboardBody(
# Boxes need to be put in a row (or column)
fluidRow(
box(plotOutput("plot1", height = 250)),
box(
title = "Controls",
sliderInput("slider", "Number of observations:", 1, 100, 50)
)
)
)
)
server <- function(input, output) {
set.seed(122)
histdata <- rnorm(500)
output$plot1 <- renderPlot({
data <- histdata[seq_len(input$slider)]
hist(data)
})
}
shinyApp(ui, server)
但是,当我将其部署到在AWS实例上运行的shiny-server
时,它无法正确呈现。我认为shinydashboard
一定有问题,因为我在服务器上运行了其他闪亮的应用程序,并且它们运行正常。唯一出现此问题的应用是我正在尝试使用shinydashboard
进行部署的应用。它已安装在服务器上,所以我不确定可能会丢失什么。这是服务器上的外观:
编辑::
它似乎也可以在shinyapps.io
上完美运行。因此,必须与我的AWS Ubuntu服务器和shinydashboard
配合使用。我已经安装了它及其‘0.7.1’
软件包版本。这可能是什么?
答案 0 :(得分:0)
服务器/应用程序日志中是否有任何内容?
/var/log/shiny-server.log
/var/log/shiny-server/*.log
我认为直方图框也应该呈现,除非缺少括号/逗号?