Learn R Programming

shinyMobile (version 0.1.0)

f7Select: Create an f7 select input

Description

Create an f7 select input

Usage

f7Select(inputId, label, choices)

Arguments

inputId

Select input id.

label

Select input label.

choices

Select input choices.

Examples

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

 shiny::shinyApp(
   ui = f7Page(
     title = "My app",
     f7SingleLayout(
      navbar = f7Navbar(title = "f7Select"),
      f7Select(
       inputId = "variable",
       label = "Choose a variable:",
       choices = colnames(mtcars)[-1]
      ),
      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