I'm writing a shiny app with the help of datatables and I would like to make small boxes that will explain what each column means. Ideally, I would like them to appear when you move the cursor over the name of the column.
Here is an app:
ui.R
library(shiny)
data(iris)
shinyUI(fluidPage(
sidebarLayout(
sidebarPanel(
fluidRow(
column(12,
wellPanel(
radioButtons("species", label="Species:",
choices=levels(iris$Species),
selected=levels(iris$Species)[1]
)
)
)
)
),
mainPanel(
fluidRow(column(12,
dataTableOutput("table1")
)
)
)
)
)
)
server.R
library(shiny)
library(dplyr)
library(tidyr)
data(iris)
shinyServer(function(input, output) {
iris1 <- reactive({
iris %>%
filter(Species %in% input$species)
})
output$table1 <- renderDataTable({
iris1()
})
})
And I would like to have sth like this, when you move the courser over the Species column name:
Is it even possible? Please help.