我目前正在尝试将使用 dygraphs 包的 R 闪亮应用程序部署到 shinyapps.io。我的应用程序在本地运行良好,但是当我尝试部署它时说找不到网页 - “HTTP 500 内部服务器错误”。我的用户界面代码是:
shinyUI(fluidPage(
titlePanel("MyApp"),
fluidRow(
column(12,
p("Info Text")
,dygraphOutput("plot")
)
)
))
服务器代码是:
shinyServer(function(input, output) {
library(shiny)
library(dygraphs)
output$plot<- renderDygraph({
data <- read.csv("data.csv", header=TRUE, sep =",",na.strings="-")
dygraph(data, main = "Plot") %>%
dyLegend(width = 170 ,
labelsSeparateLines = TRUE ,
show = "always") %>%
dyOptions(stackedGraph = FALSE)
当我从 UI 代码中删除 dygraphOutput 函数时,应用程序部署成功。有没有人遇到过类似的dygraphs问题?