View source: R/create_project.R
create_project | R Documentation |
Creates a directory with the essential files for a new project. The function can be used on existing project directories as well. Existing files will not be overwritten; rather, the user will be prompted whether to replace the existing file with the template file.
create_project(
path,
path_data = NULL,
template = "default",
git = TRUE,
renv = TRUE,
symlink = git,
renv.settings = NULL,
overwrite = NA,
open = interactive()
)
path |
A path. If it exists, it is used. If it does not exist, it is created. |
path_data |
A path. The directory where the secure data exist. Default is
|
template |
A project template. See vignette for details. |
git |
Logical indicating whether to create Git repository. Default is |
renv |
Logical indicating whether to add renv to a project.
Default is |
symlink |
Logical indicating whether to place a symbolic link
to the location in |
renv.settings |
A list of renv settings passed to |
overwrite |
Logical indicating whether to overwrite existing files
if they exist. Options are
|
open |
Logical indicating whether to open new project in fresh RStudio session |
NULL, places project template in new or existing directory
Users can create a personalized project template. Check out the vignette for step by step instructions.
Daniel D. Sjoberg
use_project_file()
# specifying project folder location (folder does not yet exist)
project_path <- file.path(tempdir(), "My Project Folder")
# creating folder where secure data would be stored (typically will be a network drive)
secure_data_path <- file.path(tempdir(), "secure_data")
dir.create(secure_data_path)
# creating new project folder
create_project(project_path, path_data = secure_data_path)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.