The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Type: Package
Title: Creates a Scientific Project Skeleton as an R Package
Version: 1.0.0
Description: Provides a template for new research projects structured as an R package-based research compendium. Everything - data, R scripts, custom functions and manuscript or reports - is contained within the same package to facilitate collaboration and promote reproducible research, following the FAIR principles.
Language: en-US
License: MIT + file LICENSE
Depends: R(≥ 4.1.0)
Imports: usethis (≥ 2.0.0), rstudioapi
Suggests: knitr, renv, rmarkdown, targets, testthat (≥ 3.0.0), withr
VignetteBuilder: knitr
Config/testthat/edition: 3
RoxygenNote: 7.3.3
Encoding: UTF-8
URL: https://github.com/saskiaotto/SCIproj
BugReports: https://github.com/saskiaotto/SCIproj/issues
NeedsCompilation: no
Packaged: 2026-03-13 14:49:55 UTC; saskiaotto
Author: Saskia Otto ORCID iD [aut, cre, cph]
Maintainer: Saskia Otto <saskia.a.otto@gmail.com>
Repository: CRAN
Date/Publication: 2026-03-18 10:50:10 UTC

SCIproj package

Description

Generic template for research projects structured as R packages. This package works as a template for new research projects, under the idea of having everything (data, R scripts, functions and manuscripts) contained in the same package to promote reproducible research.

Details

For detailed steps on how to use the package see https://github.com/saskiaotto/SCIproj/blob/main/README.md.

Author(s)

Saskia A. Otto

See Also

Useful links:


Clean a directory name into a valid R package name

Description

Converts underscores and hyphens to dots and removes other invalid characters. R package names may only contain letters, numbers, and dots, must start with a letter, and must not end with a dot.

Usage

clean_pkg_name(name)

Arguments

name

Character. The directory name to clean.

Value

A valid R package name.


Create new data analysis project as R package

Description

Create all the scaffolding for a new project in a new directory. The scaffolding includes a README file, different folders to hold raw data, analyses, etc, a _targets.R pipeline template, renv dependency management, and a CITATION.cff file. Optionally, initialize a git repository and/or set up a private or public GitHub repo with GitHub Actions CI.

Usage

create_proj(
  name,
  data_raw = TRUE,
  makefile = FALSE,
  testthat = FALSE,
  use_pipe = FALSE,
  add_license = NULL,
  license_holder = "Your name",
  orcid = NULL,
  use_git = TRUE,
  create_github_repo = FALSE,
  private_repo = TRUE,
  ci = "none",
  use_renv = TRUE,
  use_targets = TRUE,
  use_docker = FALSE,
  open_proj = FALSE,
  verbose = FALSE
)

Arguments

name

Character. Name of the new project. Could be a path, e.g. "~/myRcode/newproj". A new folder will be created with that name. The directory name can contain underscores or hyphens (e.g. "my_project") — these will be automatically converted to dots for the internal R package name (e.g. my.project in DESCRIPTION).

data_raw

Logical. If TRUE (default), adds a data-raw/ folder for all the raw data files, including a clean_data.R script file for generating clean datasets, a DATA_SOURCES.md for documenting data provenance (source, license, download date, DOI), and a README.

makefile

Logical. If TRUE, adds a template makefile.R file to the project.

testthat

Logical. If TRUE, adds testthat infrastructure.

use_pipe

Logical. If TRUE, adds magrittr's pipe operator to the package. Default is FALSE since R >= 4.1.0 provides the native pipe operator |> which is recommended instead.

add_license

Character. Type of license to add. Options are "MIT", "GPL", "AGPL", "LGPL", "Apache", "CCBY", or "CC0". Default is NULL (no license added).

license_holder

Character. Name of the license holder / project author. Also used in CITATION.cff. Default is "Your name".

orcid

Character. ORCID iD of the project author (e.g. "0000-0001-7986-0308"). Used in CITATION.cff. Default is NULL.

use_git

Logical. If TRUE (default), initializes a local git repository.

create_github_repo

Logical. If TRUE, creates a GitHub repository. Note this requires some working infrastructure like git and a GITHUB_PAT. See https://usethis.r-lib.org/articles/articles/usethis-setup.html.

private_repo

Logical. If TRUE (default), the GitHub repo will be private.

ci

Character. Type of continuous integration for your GitHub repository. Options are "none" (default) or "gh-actions" (uses GitHub Actions with R CMD check). Only used when create_github_repo = TRUE.

use_renv

Logical. If TRUE (default), initializes renv for dependency management. Creates a lockfile and .Rprofile bootstrap.

use_targets

Logical. If TRUE (default), adds a _targets.R template file for pipeline-based workflow management.

use_docker

Logical. If TRUE, adds a template Dockerfile for building a reproducible computational environment.

open_proj

Logical. If TRUE, opens the newly created RStudio project in a new session. Default is FALSE — open the .Rproj file manually after creation.

verbose

Logical. If TRUE, prints verbose output in the console while creating the new project. Default is FALSE.

Details

SCIproj creates a research compendium that combines structure (where files live) with workflow (how analyses are reproduced). By default, it sets up:

Since R >= 4.1.0, the native pipe operator |> is available and recommended over the magrittr pipe %>%. The use_pipe parameter is therefore set to FALSE by default.

Value

Invisibly returns the path to the new project directory.

Examples

## Not run: 
library("SCIproj")

# Minimal project (includes renv + targets by default)
create_proj("myproject")

# Names with underscores/hyphens are fine — the R package name is
# auto-cleaned (e.g. "baltic_cod" -> "baltic.cod" in DESCRIPTION)
create_proj("baltic_cod_analysis")

# Full-featured project
create_proj("my_research_project",
  add_license = "MIT",
  license_holder = "Jane Doe",
  orcid = "0000-0001-2345-6789",
  create_github_repo = TRUE,
  ci = "gh-actions"
)

# Minimal without workflow tools
create_proj("myproject", use_renv = FALSE, use_targets = FALSE)

## End(Not run)

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.