inputs-multi-data-types.Rmd
customers <- customers_data(100)
All the inputs can be generated with a single function: shinymatic::autoinputs()
ui <- shiny::fluidPage(fluidRow(
column(3,
h3('Inputs based on df'),
autoinputs(.df=customers)
),
column(3,
h3('Outputs based on inputs'),
verbatimTextOutput(outputId = 'values')
)
))
server <- function(input, output) {
output$values <- reactive({
paste0(sapply(
names(customers),
FUN = function(i) paste(i, "=", input[[i]])),
collapse = '\n')
})
}
shiny::shinyApp(ui = ui, server = server)