R/global_parameters.R

Defines functions choose_project_directory

Documented in choose_project_directory

# Environment for the global variables
mscleanrCache <- new.env()
assign("overwrite",     FALSE, envir = mscleanrCache)
assign("shiny_running", FALSE, envir = mscleanrCache)


#' Declare the project directory for the analysis process.
#'
#' @param project_directory The path of the project directory.
#' @param overwrite A boolean indicating whether to stop the script if there is an existing analysis or overwrite it.
#' @export
choose_project_directory <- function(project_directory, overwrite = FALSE) {
    check_boolean(overwrite, "overwrite")
    assign("analysis_directory", project_directory, envir = mscleanrCache)
    assign("overwrite",          overwrite,         envir = mscleanrCache)
}
eMetaboHUB/MS-CleanR documentation built on Jan. 3, 2024, 8:55 p.m.