Insert Figure in shiny navbarPage

后端 未结 1 1533
不知归路
不知归路 2021-01-25 12:15

Friends could help me insert a figure into my shiny navbarPage. I would like to remove the written word "Simulation" in my navbarPage and insert the attached figure in

相关标签:
1条回答
  • 2021-01-25 13:03

    Would this work?

    library(shiny)
    library(shinythemes)
    shinyUI(
        navbarPage(title = div("", img(src = "simulation.jpg", id = "simulation", height = "50px",width = "100px",style = "position: relative; margin:-15px 0px; display:right-align;")), 
                   theme = shinytheme("flatly"), 
                   tabPanel("Simulation",collapsible = TRUE,
                            sidebarLayout(
                                sidebarPanel(
                                    sliderInput("bins",
                                                "Number of bins:",
                                                min = 1,
                                                max = 50,
                                                value = 30)
                                ),
    
                                sidebarLayout(
                                    sidebarPanel(
                                        sliderInput("bins",
                                                    "Number of bins:",
                                                    min = 1,
                                                    max = 20,
                                                    value = 30)
                                    ),
                                    mainPanel(
                                        plotOutput("distPlot")
                                    )
                                )
                            ))
        )
    
    )
    

    0 讨论(0)
提交回复
热议问题