【发布时间】:2021-09-01 15:30:42
【问题描述】:
我正在寻找在我的 ui.R 中放入相同的 tabPanel :1 highchartOutput 和 1 wordcloud2Output 但只有我的 wordcloud2Output 打印。 我尝试隔离,我的 highchartOutput,没问题它在同一个 tabPanel 中没有 wordcloud2Output 运行。
示例:
ui <- fluidPage(
navbarPage(
"Try put Wordcloud2 and Highcharter in the same page",
id = "main_navbar",
tabPanel(
"MytabPanel",
fluidRow(
width = 12,
column(width = 7, wordcloud2Output("tdb1_wordcloud", height = 620)),
column(width = 5, highchartOutput("tdb1_myplot", height = 620)))) ))
#_______________________
server <- function(input, output, session) {
output$tdb1_wordcloud <- renderWordcloud2({
wordcloud2(data.table(word = c("email","phone","visit"), freq = c(10,15,4))) })
output$tdb1_myplot <- renderHighchart({
x <- c(rnorm(10000), rnorm(1000, 4, 0.5))
hchart(x, name = "data") }) }
#_______________________
runApp(list(ui = ui, server = server),launch.browser = TRUE)
shiny render with wordcloud2Output + highchartOutput
如果我将我的“wordcloud2Output”放在评论中,我的 highchartOutput 就会运行
shiny render with only highchartOutput
感谢您的帮助!
【问题讨论】:
标签: r shiny shinydashboard r-highcharter wordcloud2