R/create_path_to_file.R

Defines functions create_path_to_file

Documented in create_path_to_file

#' Creates a full file path by taking name components sans punctuation
#' @param path_folder path to destination folder including forward slashes
#' @param basename    basename of file without file extension
#' @param file_extension file extension
#' @export
create_path_to_file <-
        function(path_folder, basename, file_extension = NULL) {
                if (is.null(file_extension)) {
                        paste0(path_folder, "/", basename)
                } else {
                        paste0(path_folder, "/", basename, ".", file_extension)
                }
        }
patelm9/mirroR documentation built on Feb. 12, 2020, 2:41 p.m.