使用时,shinydashboard
我发现有些图标似乎有效,而有些则无效。在下面的示例中,电池充满的图标不起作用,而时钟-o 图标工作正常。我无法弄清楚为什么会发生这种情况。
library(shiny)
library(shinydashboard)
header <- dashboardHeader(title="Some Icons Not Working?")
# No sidebar --------------------------------------------------------------
sm <- sidebarMenu(
sm <- sidebarMenu(
menuItem(
text="asdf",
tabName="asdfasdf",
icon=icon("battery-full")),
menuItem(
text="qwer",
tabName="qwerqwer",
icon=icon("clock-o"))
)
)
sidebar <- dashboardSidebar(sm)
# Compose dashboard body --------------------------------------------------
body <- dashboardBody(
tabItems(
)
)
# Setup Shiny app UI components -------------------------------------------
ui <- dashboardPage(header, sidebar, body, skin="black")
# Setup Shiny app back-end components -------------------------------------
server <- function(input, output) {
}
# Render Shiny app --------------------------------------------------------
shinyApp(ui, server)