【发布时间】:2015-12-17 14:53:22
【问题描述】:
当使用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)
【问题讨论】:
-
尝试使用这个版本的离子图标:ionic.io/ionicons/v2
标签: r shiny font-awesome shinydashboard