Hi,
I'm working my way through the R Shiny Articles and am in the section on gadgets. When working with the tabs.R file I get the following error:
The `name` provided ('map-o') does not correspond to a known icon
In fact I can't seem to reference any fa name. I explicitly loaded the library even though it's not shown in the Article's example to no avail. This is the first time I use fa icons with R (I've used them a lot in js and python).
I'd appreciate any help. Loving the articles!
For reference this is from the website:
library(shiny)
library(miniUI)
library(leaflet)
library(ggplot2)
ui <- miniPage(
gadgetTitleBar("Shiny gadget example"),
miniTabstripPanel(
miniTabPanel("Parameters", icon = icon("sliders"),
miniContentPanel(
sliderInput("year", "Year", 1978, 2010, c(2000, 2010), sep = "")
)
),
miniTabPanel("Visualize", icon = icon("area-chart"),
miniContentPanel(
plotOutput("cars", height = "100%")
)
),
miniTabPanel("Map", icon = icon("map-o"),
miniContentPanel(padding = 0,
leafletOutput("map", height = "100%")
),
miniButtonBlock(
actionButton("resetMap", "Reset")
)
),
miniTabPanel("Data", icon = icon("table"),
miniContentPanel(
DT::dataTableOutput("table")
)
)
)
)
server <- function(input, output, session) {
output$cars <- renderPlot({
require(ggplot2)
ggplot(cars, aes(speed, dist)) + geom_point()
})
output$map <- renderLeaflet({
force(input$resetMap)
leaflet(quakes, height = "100%") %>% addTiles() %>%
addMarkers(lng = ~long, lat = ~lat)
})
output$table <- DT::renderDataTable({
diamonds
})
observeEvent(input$done, {
stopApp(TRUE)
})
}
runGadget(shinyApp(ui, server), viewer = paneViewer())