私はいくつかのチャートで光沢のあるモジュールを使用していますが、すべてうまくいきます(驚くべき機能です)...しかし、それらをvalueBox(shinydashboard)与えられた例parameteres「数」と「メトリック」を明示的に提供されてshinyモジュールを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)
が、私の意図は、それらがデータフレームの変数として定義されますです:何も はここで、最小限の例です...レンダリングされません。
何か歓迎されます! (申し訳ありませんmy english)
あなたがrenderUIを(使用してみました)の代わりにrenderValueBoxの?これは回避策ですが、問題が解決する可能性があります。 – thisislammers
renderUIを使用するsuccesはありません。 – COLO