我在centos 6上使用闪亮的服务器,它可以很好地应用于我的大多数应用程序,但是当我将它与rCharts一起使用时会出现一些问题(ggplot2是可以的)。chrome给了我一条消息:“加载资源失败:服务器响应状态为500 (内部服务器错误) ",但我可以在本地Windows7系统上运行相同的代码。而且没有错误日志。这有什么问题。如果有朋友知道如何处理,请告诉我,谢谢。
守则是:
server.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")
)
))发布于 2014-10-17 05:52:56
嗯!我终于检查出来了,因为我没有将应用程序(ui.R和server.R)的模式更改为可读的模式!经过ui.R和server.R的chmod 755后,效果很好。
https://stackoverflow.com/questions/26417013
复制相似问题