R/set.dir.R

Defines functions set.dir

#' Title
#'
#' set.dir set the working directory. If the provided working directory does not exist,
#' the function create a new folder.
#'
#' @param dir is a string with the directory name.
#'
#' @return
#' @export
#'
#' @examples
#' #For mac
#' set.dir("/Users/user/Documents/example)
set.dir <- function(dir) {
  dir.create(dir, showWarnings = FALSE)
  setwd(dir)
}
gabrielzanlorenssi/extfunctions documentation built on Dec. 30, 2019, 6:37 p.m.