Learn R Programming

shinyMobile (version 0.7.0)

f7checkBoxGroup: Create an f7 checkbox group input

Description

Create an f7 checkbox group input

Usage

f7checkBoxGroup(inputId, label, choices = NULL, selected = NULL)

Arguments

inputId

Checkbox group input.

label

Checkbox group label.

choices

Checkbox group choices.

selected

Checkbox group selected value.

Examples

Run this code
# NOT RUN {
if(interactive()){
  library(shiny)
  library(shinyMobile)

  shiny::shinyApp(
    ui = f7Page(
     title = "My app",
     f7SingleLayout(
      navbar = f7Navbar(title = "f7checkBoxGroup"),
      f7checkBoxGroup(
       inputId = "variable",
       label = "Choose a variable:",
       choices = colnames(mtcars)[-1],
       selected = NULL
      ),
      tableOutput("data")
     )
    ),
    server = function(input, output) {
     output$data <- renderTable({
      mtcars[, c("mpg", input$variable), drop = FALSE]
      }, rownames = TRUE)
    }
  )
 }
# }

Run the code above in your browser using DataLab