inst/examples/server.R

server <- function(input, output, session) {
  output$summary <- renderPrint({
    dataset <- get(input$dataset, "package:datasets")
    summary(dataset)
  })

  output$table <- renderTable({
    dataset <- get(input$dataset, "package:datasets")
    dataset
  })
}

Try the r2social package in your browser

Any scripts or data that you put into this service are public.

r2social documentation built on Sept. 11, 2024, 7:47 p.m.