worcs_project: Create new WORCS project

View source: R/worcs_project.R

worcs_projectR Documentation

Create new WORCS project

Description

Creates a new 'worcs' project. This function is invoked by the 'RStudio' project template manager, but can also be called directly to create a WORCS project through syntax or the console.

Usage

worcs_project(
  path = "worcs_project",
  manuscript = "APA6",
  preregistration = "cos_prereg",
  add_license = "CC_BY_4.0",
  use_renv = TRUE,
  use_targets = FALSE,
  remote_repo = "https",
  verbose = TRUE,
  ...
)

Arguments

path

Character, indicating the directory in which to create the 'worcs' project. Default: 'worcs_project'.

manuscript

Character, indicating what template to use for the 'R Markdown' manuscript. Default: 'APA6'. Available choices include APA6 from the papaja package, a github_document, and templates included in the rticles package. For more information, see add_manuscript.

preregistration

Character, indicating what template to use for the preregistration. Default: 'cos_prereg'. Available choices include: "PSS", "Secondary", "None", and all templates from the prereg package. For more information, see add_preregistration.

add_license

Character, indicating what license to include. Default: 'CC_BY_4.0'. Available options include: "CC_BY_4.0", "CC_BY-SA_4.0", "CC_BY-NC_4.0", "CC_BY-NC-SA_4.0", "CC_BY-ND_4.0", "CC_BY-NC-ND_4.0", "None". For more information, see https://creativecommons.org/licenses/.

use_renv

Logical, indicating whether or not to use 'renv' to make the project reproducible. Default: TRUE. See init.

use_targets

Logical, indicating whether or not to use 'targets' to create a Make-like pipeline. Default: FALSE See targets-package.

remote_repo

Character, address of the remote repository for this project. This link should have the form https://github.com[username][repo].git (preferred) or git@[...].git (if using SSH). If a valid remote repository link is provided, a commit will be made containing the 'README.md' file, and will be pushed to the remote repository. Default: 'https'.

verbose

Logical. Whether or not to print messages to the console during project creation. Default: TRUE

...

Additional arguments passed to and from functions.

Value

No return value. This function is called for its side effects.

Examples

the_test <- "worcs_template"
old_wd <- getwd()
dir.create(file.path(tempdir(), the_test))
do.call(git_user, worcs:::get_user())
worcs_project(file.path(tempdir(), the_test, "worcs_project"),
              manuscript = "github_document",
              preregistration = "None",
              add_license = "None",
              use_renv = FALSE,
              remote_repo = "https")
setwd(old_wd)
unlink(file.path(tempdir(), the_test))

cjvanlissa/worcs documentation built on Nov. 7, 2024, 1:20 p.m.