Created
November 10, 2012 08:13
-
-
Save jcheng5/4050398 to your computer and use it in GitHub Desktop.
Shiny file upload demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shinyServer(function(input, output) { | |
output$filetable <- reactiveTable(function() { | |
if (is.null(input$files)) { | |
# User has not uploaded a file yet | |
return(NULL) | |
} | |
input$files | |
}) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shinyUI(pageWithSidebar( | |
headerPanel("File input test"), | |
sidebarPanel( | |
fileInput("files", "File data", multiple=TRUE) | |
), | |
mainPanel( | |
tableOutput("filetable") | |
) | |
)) |
What about if i don't wanna return all the file informations but just the filename. Like for example '/User/Documents/.../filename' the output would look like 'filename'
Dear,
I am new to R-shiny, Can you please help me "how to create a graph using the file which user loaded manually through fileinput function.?
Basically i would like to access the variable from the file loaded by user and create a graph
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm running my app locally and can't seem to do a multi-select for files when I specify "multiple=TRUE". I'm on Mac OS Yosemite. If it's local, don't see how my web browser figures into this. Has anyone else had this problem? I tried shift-clicking, command-clicking, command-A, and nothing works.