create_project: Start a New Biostatistics project

create_projectR Documentation

Start a New Biostatistics project

Description

Creates a directory with the essential files for a new project. The function can be used on existing project directories as well.

The folder name should be structured as "<PI Last Name> <Short Description>", e.g. "Sjoberg MRI detects Path Stage after Surgery". PI last name is used in file naming.

Usage

create_bst_project(path, path_data = NULL, git = NA, ...)

Arguments

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 NULL. When supplied, a symbolic link to data folder will be created.

git

Logical indicating whether to create Git repository. Default is TRUE When NA, user will be prompted whether to initialise Git repo.

...

Arguments passed on to starter::create_project

renv

Logical indicating whether to add renv to a project. Default is TRUE. When NA user is asked interactively for preference.

symlink

Logical indicating whether to place a symbolic link to the location in ⁠path_data=⁠. Default is to place the symbolic link if the project is a git repository.

renv.settings

A list of renv settings passed to renv::scaffold(settings=)

overwrite

Logical indicating whether to overwrite existing files if they exist. Options are TRUE, FALSE, and NA (aka ask interactively). Default is NA

open

Logical indicating whether to open new project in fresh RStudio session

See Also

starter::create_project()

Examples


# specifying project folder location (folder does not yet exist)
project_path <- fs::path(tempdir(), "My Project Folder")

# creating folder where secure data would be stored (typically will be a network drive)
secure_data_path <- fs::path(tempdir(), "secure_data")
dir.create(secure_data_path)

# creating new project folder
create_bst_project(project_path, path_data = secure_data_path)


ddsjoberg/bstfun documentation built on July 4, 2023, 10:59 a.m.