R/check_infiles.R

Defines functions check_infiles

check_infiles <- function(infiles) {

  for (file in infiles) {
    if (length(file) != 1) {
      stop("Input filepath must be of length one and not NULL")
    }
    if (!file.exists(file)) {
      stop(paste0("Input file ", file, " does not exist"))
    }
  }

}

Try the cmsafops package in your browser

Any scripts or data that you put into this service are public.

cmsafops documentation built on Sept. 18, 2023, 5:16 p.m.