我一直试图将链接另一个仪表板添加到我的闪亮应用程序中。我已经在仪表板中创建了一个值框,一旦单击它,我希望它可以定向到我创建的另一个仪表板。
library(shinydashboard);
ui <- dashboardPage(
dashboardHeader(title = "Value boxes"),
dashboardSidebar(),
dashboardBody(
fluidRow(
# A static valueBox
valueBox(10 * 2, "New Orders", icon = icon("credit-card")),
# Dynamic valueBoxes
valueBoxOutput("progressBox"),
valueBoxOutput("approvalBox")
),
fluidRow(
# Clicking this will increment the progress amount
box(width = 4, actionButton("count", "Increment progress"))
)
)
)
server <- function(input, output) {
output$progressBox <- renderValueBox({
valueBox(
paste0(25 + input$count, "%"), "Progress", icon = icon("list"),
color = "purple"
)
})
output$approvalBox <- renderValueBox({
valueBox(
"80%", "Approval", icon = icon("thumbs-up", lib = "glyphicon"),
color = "yellow"
)
})
}
we = shinyApp(ui, server)
我想将上面创建的仪表板链接到下面的仪表板。当我单击下面的应用程序中创建的值框时,我希望它弹出。 库(发光)
ui <- dashboardPage(
dashboardHeader(title = "Clustering"),
dashboardSidebar(),
dashboardBody(
fluidRow(
valueBox(2, "Clusters found", icon = icon("list"), color = "purple",
href = "we"),
valueBox(2,"Prominent cluster numbers", color = "orange", icon =
icon("angle-double-left"))
)
)
)
server <- function(input, output, session) {
}
提前谢谢