我莫名其妙地不起作用。什么都没有显示,但是没有错误显示。这是从我的UI中获得的,因此所有库都已加载:
tags$head(
tags$link(rel = "stylesheet", type = "text/css", href = "style_mozilla_win.css"),
tags$link(rel = "stylesheet", type = "text/css", href="nv.d3.css")
),
HTML('
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
'),
....
mainPanel(
showOutput("SectorCharting", "nvd3")
)
从我的服务器
output$SectorCharting<-renderChart({
hair_eye_male <- subset(as.data.frame(HairEyeColor), Sex == "Male")
n1 <- nPlot(Freq ~ Hair, group = "Eye", data = hair_eye_male,
type = 'multiBarChart')
return(n1)
})
这个问题与昨天的问题相同,在此之前也有很多问题,请使用UserenderChart2
代替renderChart
。
rm(list = ls())
library(shiny)
library(rCharts)
ui =pageWithSidebar(
headerPanel("Test"),
sidebarPanel(),
mainPanel(
showOutput("SectorCharting", "nvd3")
)
)
server = function(input, output) {
output$SectorCharting <-renderChart2({
hair_eye_male <- subset(as.data.frame(HairEyeColor), Sex == "Male")
n1 <- nPlot(Freq ~ Hair, group = "Eye", data = hair_eye_male,
type = 'multiBarChart')
return(n1)
})
}
runApp(list(ui = ui, server = server))
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句