Description Usage Value Examples
View source: R/loaddata_module.R
Choose between .txt, .csv, .FEATHER format.
1 | loadfile(input, output, session)
|
A reactive Dataframe.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | require(shiny)
if (interactive()) {
ui <-
fluidPage(
sidebarLayout(
sidebarPanel(
loadfileUI(id = "read")
),
mainPanel(tableOutput("tbl"))
)
)
server <- function(input, output, session) {
data <- callModule(loadfile, "read")
output$tbl <- renderTable({
validate(need(data(), message = FALSE))
head(data()())
})
}
shinyApp(ui, server)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.