Created
March 26, 2019 19:47
-
-
Save hansen-m/fcd31b5d98e26eca5e83cf7af0996352 to your computer and use it in GitHub Desktop.
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
# | |
# This is the server logic of a Shiny web application. You can run the | |
# application by clicking 'Run App' above. | |
# | |
# Find out more about building applications with Shiny here: | |
# | |
# http://shiny.rstudio.com/ | |
# | |
library(shiny) | |
# Server | |
shinyServer(function(input, output) { | |
shinyDirChoose(input, 'files', root=c(root='.')) | |
shinyFileChoose(input, 'files', root=c(root='.')) | |
#path <- Sys.getenv("R_SESSION_TMPDIR") | |
path <- "." | |
files <- list.files(path = path, full.names = TRUE, recursive = TRUE) | |
output$table <- renderTable(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
# | |
# This is the user-interface definition of a Shiny web application. You can | |
# run the application by clicking 'Run App' above. | |
# | |
# Find out more about building applications with Shiny here: | |
# | |
# http://shiny.rstudio.com/ | |
# | |
library(shiny) | |
library(shinyFiles) | |
# UI | |
shinyUI(basicPage( | |
shinyFilesButton('files', label='Files Browse', title='Select a file', multiple=FALSE), | |
shinyDirButton('files', label='Folder Browse', title='Select a folder'), | |
tableOutput('table') | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment