I am looking for a way to capture standard error and redirect it to standard output in R (Shiny). I can not find any information any where in the web. Is there a way to do this? Instead of the error showing in the console, I would like to display them in the gui panel. Can this be done?
I am trying the code below so that if there is neither "/" nor "" the output is an error and the application stops, but ir does not work.
if (grepl("/", OUTpath, fixed=TRUE)) { # mac style
OUTpath<- paste(paste(unlist(strsplit(OUTpath, "/", fixed=TRUE)), collapse="/"), "/", sep="")
} else
if (grepl("\\", OUTpath, fixed=TRUE)) { # windows style
OUTpath<- paste(paste(unlist(strsplit(OUTpath, "\\", fixed=TRUE)), collapse="\\"), "\\", sep="")
} else
if(!grepl("/", OUTpath, fixed=TRUE) || !grepl("\\", OUTpath, fixed=TRUE)){
trueFalse = FALSE
errorMessage("Unrecognized path separator in OUTpath or no path specification in PARAMS file. Cannot open connection\n
You can edit your input file and save the changes. Afterwards, stop and restart glycoPipe and upload file again")
stop("Unrecognized path separator in OUTpath\n")
}