【发布时间】:2021-07-29 20:56:43
【问题描述】:
我希望嵌入的网站显示在侧边栏菜单的右侧,但嵌入的网站显示在侧边栏菜单中。当用户按下细胞培养下的控制图时,嵌入的网站应该清楚地显示在右侧。这是我的问题图片]1
如何解决此错误? 这是我的代码:
library(shiny)
library(shinydashboard)
ui <-
dashboardPage(skin="black",
dashboardHeader(title = "CPV Dashboard ", titleWidth = 450),
dashboardSidebar(
sidebarMenu(
menuItem("Tab 1", tabName = "tab 1", icon = icon("medicine"),
menuItem("Cell Culture",
menuItem("Control Chart", mainPanel(fluidRow(
htmlOutput("frame")))))))
),
dashboardBody())
server = function(input, output, session){
observe({
test <<- paste0("https://google.com") #sample url
})
output$frame <- renderUI({
input$Member
my_test <- tags$iframe(src=test, height=800, width=800)
print(my_test)
my_test
})
}
shinyApp(ui, server)
【问题讨论】:
标签: r shiny shinydashboard