【发布时间】:2017-06-26 14:14:30
【问题描述】:
我有以下代码用于生成 navbarPage 的闪亮应用程序
library(shiny)
library(shinythemes)
ui <- navbarPage(
title = "Report", theme = shinytheme("cerulean"),
tabPanel("About"),
tabPanel(
"Plots",
fluidPage(
tabsetPanel(
type = "pills",
tabPanel("A"),
tabPanel(
"B",
sidebarLayout(
sidebarPanel(h4("Checkbox"),
checkboxInput("total", label = "total"),
uiOutput("conditionalInput"),
width = 3
),
mainPanel(
tabsetPanel(
tabPanel("a"),
tabPanel("b"),
tabPanel("c"),
tabPanel("d"),
tabPanel("e")
)
)
)
)
)
)
)
)
server <- function(input, output) {
output$conditionalInput <- renderUI({
if (input$total == FALSE) {
checkboxGroupInput("verticais",
label = "",
choices = list(
"1.1" = 1,
"1.2" = 2,
"1.3" = 3,
"1.4" = 4,
"1.5" = 5,
"1.6" = 6,
"1.7" = 7,
"1.8" = 8
),
selected = c(1:8), inline = FALSE
)
}
})
}
# Run the application
shinyApp(ui = ui, server = server)
产生这个output
但是,出于布局目的,我想在窗口的最右侧(靠近发布按钮的位置)放置一个徽标。 我尝试了question 中描述的内容,但没有成功。
因此,我想知道是否有其他解决方法可以解决我的问题。
请注意,我在正确的 www 文件夹中有图像文件
【问题讨论】:
-
请包括可重现的例子
-
你能说得清楚一点吗?我真诚地不知道缺少什么,因此您(或其他任何人)可以帮助我解决我的问题。
-
请至少包含一个与您尝试过的代码一起运行(不带
...)的代码 -
css 答案here 可能会有所帮助。如果没有 css,我看不出你还能怎么做
-
@waterling 无法让它发挥作用,但我会继续努力。我还编辑了问题以包含一个可重复的示例。