일부 차트에서는 반짝이는 모듈을 사용하고 있으며 모든 것이 잘 작동합니다 (놀라운 기능!). 그러나 이들을 valueBox (shinydashboard)에서 사용할 수 없습니다. 주어진 예제 parameteres "수"와 "메트릭"명시 적으로 제공됩니다에서샤이니 모듈을 valueBox와 함께 사용할 수 없습니다.
library(shinydashboard)
# MODULE UI
bsc_tile_UI <- function(id) {
ns <- NS(id)
valueBoxOutput("tile1", width=12)
}
# MODULE Server
bsc_tile_OUT <- function(input, output, session, number, metric) {
output$tile1 <- renderValueBox({
valueBox(number, paste(metric), icon = icon("arrow-up"),color = "blue",
width=12)
})
}
ui<-dashboardPage(
dashboardHeader(title = "Dashboard"),
sidebar <- dashboardSidebar(disable = TRUE),
dashboardBody(
fluidPage(
bsc_tile_UI("tile_1"),
bsc_tile_UI("tile_2")
)
)
)
# App server
server <- function(input, output,session){
callModule(bsc_tile_OUT, "tile_1", '300', 'metric 1')
callModule(bsc_tile_OUT, "tile_2", '500', 'metric 2')
}
shinyApp(ui, server)
,하지만 내 의도는이 dataframe의 변수로 정의 될 것이다 : 아무것도 다음은 최소한의 예입니다 ... 렌더링되지 않습니다.
도움이 될 것입니다 !!! (죄송합니다. 내 영어)
당신이 renderUI을 (사용 해봤) 대신 renderValueBox의? 이것은 일시적인 해결책이지만 문제가 해결 될 수도 있습니다. – thisislammers
renderUI를 사용하는 succes가 없습니다. – COLO