tests/test_utilities.R

getTestFile <- function(filename, package="rqubic") {
  res <- system.file("extdata", filename,
                     package=package)
  if(file.exists(res))
    return(res)
  res <- sprintf("../inst/extdata/%s", filename)
  if(file.exists(res))
    return(res)
  stop(sprintf("%s cannot be found either in installed pack directory or in the source directory",
               filename))
}

Try the rqubic package in your browser

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

rqubic documentation built on Nov. 8, 2020, 8:20 p.m.