So this is the problem. When I uploaded the file I saved to the RStudio server using the following:
observe({
if (is.null(input$file)) return()
#use recursive = TRUE if you want to override the same file
file.copy(input$file$datapath, "/home/giuseppa")
})
The file shows up in my local directory /home/user as 0.tsv.
In my sourced script, I am trying to read the file using template<- try(read.delim(parmsDefFn, as.is=T), silent=TRUE)
if (inherits(template, "try-error")) { # if error,
params <- stop("Defaults params file ",basename(parmsDefFn),"either doesn't exist or is not a valid tab-separated PARAMS file. \n")
}
and the file cannot be found. I must be doing something wrong.