Skip to content
Snippets Groups Projects
Commit 7573130a authored by Wu, Harold's avatar Wu, Harold
Browse files

08/10/20 Update GettysburgSubmissionSource.R

parent 95883d62
Branches patch-1
No related tags found
No related merge requests found
......@@ -32,6 +32,11 @@ loadData <- function(responsesDir) {
files <- list.files(file.path(responsesDir), full.names = TRUE)
data <- lapply(files, read.csv, stringsAsFactors = FALSE)
data <- do.call(rbind, data)
if (length(list.files(file.path(responsesDir))) != 0) {
write.csv(x = data, file = file.path(responsesDir, "responses.csv"),
row.names = FALSE, quote = TRUE)
sapply(list.files(file.path(responsesDir), full.names = TRUE)[1:length(list.files(file.path(responsesDir)))-1], unlink)
}
data
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment