Check if file exists

check_file_exists(filename, raise_error = FALSE, errmesg = NULL)

Arguments

filename

Name of file.

raise_error

logical; if TRUE, stops the execution if file does not exist. The default value is FALSE, in which case the function returns FALSE without stopping the execution.

errmesg

character string of optional error message