R/check_infile.R

Defines functions check_infile

check_infile <- function(file) {
  if (length(file) != 1) {
    stop("Input filepath must be of length one and not NULL")
  }

  if (!file.exists(file) && !is_url(file)) {
    stop("Input 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.