Description Usage Arguments Details Value See Also Examples
A function for generating a consistent file system for data files and visualizations. If none of the parameters are set the full path generated by this function will be root_path/output
1 2 3 |
start_path |
With the start_path set, the full path generated by this function will be root_path/start_path/?experiment?/?plot_type?/end_path. Default: NULL |
experiment |
(optional) This will add a second level to the start_path file system. Default: NULL |
plot_type |
(optional) This will add a third level to the start_path file system. With ONLY the plot_type set the full path generated by this function will be root_path/plot_type. Default: NULL |
end_path |
(optional) This will add the final directory to the start_path file system Default: A formatted date-time string. |
root_path |
The root of the new file system (start_path or not). Default: The working directory. |
custom_path |
This is an absolute path that overrides everything else. Default: NULL |
overwrite |
A logical denoting that overwriting is acceptable. Default: FALSE |
mkdir |
A logical denoting weather or not the directory should be created or not. Default: TRUE |
This function is incredibly useful on it's own but also for various other plotting/saving functions within the package. It helps keep data organized using a standard workflow.
Creates a directory for output and returns the path as a string.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
if(interactive()){
# Get the path to an output directory without creating
library(MicrobiomeR)
output_dir <- output_dir(start_path="output", experiment="microbiome-proj", mkdir=FALSE)
print(output_dir)
# Create a folder for your plot types
output_dir <- output_dir(plot_type="scatter-plots")
print(output_dir)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.