【发布时间】:2014-12-12 13:32:54
【问题描述】:
我在 centos 6 上使用了 shiny-server,它适用于我的大多数应用程序,但有一些问题 当我将它与 rCharts 一起使用时(ggplot2 可以)。 chrome给我一条消息“加载资源失败:服务器响应状态为500(内部服务器错误)”,但我可以在本地Windows7系统上运行相同的代码。并且没有关于它的错误日志。它出什么问题了。 有知道怎么处理的朋友请告诉我,谢谢。
代码是:
服务器.R
require(rCharts)
shinyServer(function(input, output) {
output$myChart <- renderChart({
names(iris) = gsub("\\.", "", names(iris))
p1 <- rPlot(input$x, input$y, data = iris, color = "Species",
facet = "Species", type = 'point')
p1$addParams(dom = 'myChart')
return(p1)
})
})
#ui.R
require(rCharts)
shinyUI(pageWithSidebar(
headerPanel("rCharts: Interactive Charts from R using polychart.js"),
sidebarPanel(
selectInput(inputId = "x",
label = "Choose X",
choices = c('SepalLength', 'SepalWidth', 'PetalLength', 'PetalWidth'),
selected = "SepalLength"),
selectInput(inputId = "y",
label = "Choose Y",
choices = c('SepalLength', 'SepalWidth', 'PetalLength', 'PetalWidth'),
selected = "SepalWidth")
),
mainPanel(
showOutput("myChart", "polycharts")
)
))
【问题讨论】:
标签: r internal rcharts shiny-server