mirror of
https://github.com/rstudio/shiny.git
synced 2026-02-02 02:34:57 -05:00
21 lines
540 B
R
21 lines
540 B
R
library(shiny)
|
|
|
|
shinyServer(function(input, output) {
|
|
output$contents <- renderTable({
|
|
|
|
# input$file1 will be NULL initially. After the user selects
|
|
# and uploads a file, it will be a data frame with 'name',
|
|
# 'size', 'type', and 'datapath' columns. The 'datapath'
|
|
# column will contain the local filenames where the data can
|
|
# be found.
|
|
|
|
inFile <- input$file1
|
|
|
|
if (is.null(inFile))
|
|
return(NULL)
|
|
|
|
read.csv(inFile$datapath, header=input$header, sep=input$sep,
|
|
quote=input$quote)
|
|
})
|
|
})
|