| gl.set.wd | R Documentation |
Many dartR functions have a plot.dir parameter which is used to save output to (e.g. ggplots as rds files). With this function users can set the working directory globally so it is used in all functions, without setting it explicitly. The value for wd is stored in the r environment and if not set defaults to tempdir(). This function sets the default value.
gl.set.wd(wd = tempdir(), verbose = NULL)
wd |
Path to the directory to set globally as the working directory, to be used by all functions when not set explicitly in the function [default tempdir()]. |
verbose |
Verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log; 3, progress and results summary; 5, full report [default NULL, adopting the global verbosity set by gl.set.verbosity(), or 2 if no global is set]. |
The nominated directory must already exist; gl.set.wd() does not create it. If the path does not exist (or is not a single directory path) the function stops with an error and the global working directory is left unchanged.
path to the working directory [set for all functions]
Author(s): Bernd Gruber. Custodian: Bernd Gruber (Post to https://groups.google.com/d/forum/dartr)
Other environment:
gl.check.verbosity(),
gl.check.wd(),
gl.print.history(),
gl.recalc.metrics(),
gl.set.verbosity(),
theme_dartR()
#set to current working directory
wd <- gl.set.wd(wd=getwd())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.