I am reading in several *.csv, where the names and paths are determined at runtime.
However sometimes there are files with do not exist. For this file I need kind of exception handling.
Currently I am reading in my files with:
companyFileName <- paste("C://Users//Prices//",companiesIsin,".csv")
df <- read.csv(gsub(" ","", companyFileName, fixed=TRUE), header = TRUE, sep = ";",stringsAsFactors=FALSE)
When the file does not exist in the folder I am getting an error. Is there something like exception handling in R?
I appreciate your reply!