Returns the configured output directory or constructs a path to a file
within it. The output directory is set through the option
pharos.outDir.
Value
A character string containing the normalized output directory or,
if filename is supplied, the corresponding file path.
Details
This is useful for analysis scripts that create multiple figures or other output files: the output location can be defined once at the beginning of the script and individual functions only need to specify the file name.
The configured directory must exist. outDir() does not create
directories.
Examples
if (FALSE) { # \dontrun{
options(pharos.outDir = "O:/project/graphics")
outDir()
outDir("Figure 1")
plot(1:10) |>
exportPlot(file = outDir("Figure 1"), width = 20, height = 12)
} # }
