R/madTempDir.R

Defines functions madTempDir

Documented in madTempDir

#' madTempDir
#'
#' returns a temporary directory as a subfolder of the tempfolder set in
#' \code{getConfig("tmpfolder")}.
#' @return path to the temp folder
#' @author Jan Philipp Dietrich
#' @seealso \code{\link{getConfig}}
#' @examples
#' \dontrun{
#' madrat:::madTempDir()
#' }
#'
madTempDir <- function() {
  d <- file.path(getConfig("tmpfolder"), basename(tempdir()))
  if (!dir.exists(d)) dir.create(d)
  return(d)
}

Try the madrat package in your browser

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

madrat documentation built on Aug. 23, 2023, 5:10 p.m.