create_cabinet writes code to the .Rprofile file so
that when new R sessions are started, the newly created
cabinet, an R6 object of class FileCabinet, is available
in the global environment as a hidden object. The cabinet
simply stores file location and file template information
new_cabinet_proj uses to create new projects
with the pre-defined structure.
create_cabinet(name, directory, structure, .alias = name)
Name of the cabinet; character of length 1. This is how the cabinet will be referenced, so best to chose something memorable.
The file path for where the cabinet will exist.
A list of paths of folders/files to create. See details for further explanation.
An optional name for the object the cabinet
will be stored in R as. Defaults to
Before writing to or creating a .Rprofile file, cabinets will explicitly ask for the user's permission to on exit. The cabinet structure should be defined using a list with the names defining folder paths. List values should be set to NULL.
An R6 object of class FileCabinet. The code to generate this object is written to the .Rprofile file of the home directory.