Rshiny中的罐装包为任何基本的Rshiny应用程序提供了库存外观。更高级的用户可能会选择HTML Templates。我在Rshiny UI中看到的固定包是Shiny Dashboard,Shiny Material Design和Flex dashboard。但是,为什么不能调用仪表板页面然后有闪亮的材料设计按钮,输入或卡片,反之亦然?
是什么阻止他们相互融合以给用户提供各种选择?
类似下面的代码(不按预期运行)
library(shinydashboard)
library(shiny)
library(shinymaterial)
ui <- dashboardPage(dashboardHeader(),
dashboardSidebar(material_row(
material_column(
width = 2,
material_card(
title = "",
depth = 4,
material_switch(
input_id = "trend_line",
label = "Trend Line",
off_label = "",
on_label = ""
),
material_radio_button(
input_id = "plot_theme",
label = "Theme",
choices =
c(
"Default" = "default",
"Classic" = "classic",
"Light" = "light",
"Dark" = "dark"
)
)
)
)
)),
dashboardBody())
server <- function(input, output) {
}
shinyApp(ui, server)
答案 0 :(得分:1)
似乎是一个当前的问题,你不能混合和匹配,因为shinymaterial中使用的一些CSS样式表与其他包的那些样式表重叠,例如一些基本的闪亮输入或htmlwidgets(参见here)