Skip to content

Commit

Permalink
'external_data' folder as optional second source of data files
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikSchultheis committed Jun 26, 2018
1 parent 2d881e8 commit 295d081
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions wilson-basic/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,19 @@ server <- function(session, input, output) {
# Use all .se and .clarion files specified in data/
load <- sapply(list.files(path = "data/", pattern = "\\.se|\\.clarion"), function(x){ paste0("data/", x)})

# check for additional data
if (dir.exists("external_data/")) {
# use all .se and .clarion files specified in external_data/
external <- sapply(list.files(path = "external_data/", pattern = "\\.se|\\.clarion"), function(x){ paste0("external_data/", x)})

if (length(external) > 0) {
# merge file lists
load <- c(load, external)
# sort by name
load <- load[order(names(load))]
}
}

output$fileLoader <- renderUI({
shiny::req(input$data_origin)

Expand Down

0 comments on commit 295d081

Please sign in to comment.