Learn R Programming

crunchy (version 0.3.3)

shinyDataset: Load a dataset for a Shiny session

Description

This function wraps crunch::loadDataset() in a shiny::reactive() object for use in a Shiny app. It also ensures that the current user is authenticated with Crunch before proceeding.

Usage

shinyDataset(...)

Arguments

...

Arguments passed to loadDataset

Value

A Shiny reactive object.

Examples

Run this code
# NOT RUN {
shinyServer(function(input, output, session) {
    ds <- shinyDataset("Your dataset name")

    freqs <- reactive({
        fmla <- as.formula(paste("~", input$varname))
        crtabs(fmla, data=ds())
    })
})
# }

Run the code above in your browser using DataLab