This utility function makes a results folder with the specified name within a results folder. It will also overwrite old results if required. Returns a path to the results folder.
make_results_folder(prefix, regen = FALSE)
prefix | A character string containing the name of the results folder to create |
---|---|
regen | Logical - defaulting to |
A path to the results folder.
## Code make_results_folder#> function (prefix, regen = FALSE) #> { #> if (!dir.exists("results")) { #> dir.create(here("vignettes", "results")) #> } #> if (!dir.exists(file.path("results", prefix)) | regen) { #> if (regen) { #> unlink(here(file.path("vignettes/results", prefix)), #> recursive = TRUE) #> } #> dir.create(here(file.path("vignettes", "results", prefix))) #> } #> path <- here(file.path("vignettes", "results", prefix)) #> return(path) #> } #> <bytecode: 0x55630c441e08> #> <environment: namespace:ETSMissing>