R/folder.R

Defines functions folder

Documented in folder

#' Creates a new folder where wanted if it does not exist yet
#'
#' @param dir directory containing the folder
#' @param name name of the folder
#' @return the directory of the folder itself
#' @examples
#' \donttest{folder(tempdir(),"test")}
#'
#' @export

folder<- function(dir,name)

{
  folderdir  <- paste(dir,name,sep="/")
  if (file.exists(folderdir)) {} else {dir.create(folderdir)}
  return(folderdir)
}

Try the StratigrapheR package in your browser

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

StratigrapheR documentation built on July 9, 2023, 6:02 p.m.