R/make_directories_function.R

Defines functions make.directories

Documented in make.directories

#' Create Results Directories
#'
#' Creates the directories, in which the results are going to be saved.
#' @param homedir The directory in which the result folders will be created.
#' @details All files will be stored in the main folder "FAMoS-Results". It contains the following subdirectories:
#' \describe{
#'   \item{BestModel}{Contains the information criteria and the corresponding parameter estimates of the best fitting model.}
#'   \item{Figures}{Contains figures showing the performance of the FAMoS.}
#'   \item{Fits}{Contains the fitted parameter values of each of the tested models.}
#'   \item{TestedModels}{Contains the binary information of all of the tested models.}
#'   }
#'
#' @export
#' @return Creates directories.

make.directories <- function(homedir) {
  dir <- paste0(homedir, "/FAMoS-Results")
  if(!dir.exists(dir)){
    dir.create(dir, showWarnings = F)
  }
  if(!dir.exists(paste0(dir, "/BestModel"))){
    dir.create(paste0(dir, "/BestModel"), showWarnings = F)
  }
  if(!dir.exists(paste0(dir, "/Figures"))){
    dir.create(paste0(dir, "/Figures"), showWarnings = F)
  }
  if(!dir.exists(paste0(dir, "/Fits"))){
    dir.create(paste0(dir, "/Fits"), showWarnings = F)
  }
  if(!dir.exists(paste0(dir, "/TestedModels"))){
    dir.create(paste0(dir, "/TestedModels"), showWarnings = F)
  }
}

Try the FAMoS package in your browser

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

FAMoS documentation built on April 14, 2020, 5:43 p.m.