Package 'rdst'

Title: Reproducible Data Science Project Templates
Description: Creates opinionated, reproducible data science project structures with renv for package management, targets for pipeline orchestration, and GitLab CI/CD for automated rendering and publication via GitLab Pages. Designed for solo analysts and small teams working in R with Quarto.
Authors: Teodoro J. Martinez [aut, cre]
Maintainer: Teodoro J. Martinez <[email protected]>
License: MIT + file LICENSE
Version: 0.2.0
Built: 2026-03-20 12:48:56 UTC
Source: https://github.com/TeodoroJMartinez/rdst

Help Index


Create a reproducible data science project

Description

Scaffolds a complete project structure with renv, targets, Quarto, and GitLab CI/CD pre-configured. Run once per new project.

Usage

create_project(
  path,
  author = getOption("usethis.full_name", Sys.getenv("USER")),
  gitlab_user = Sys.getenv("GITLAB_USER", unset = "gitlab_user"),
  r_version = paste(R.version$major, strsplit(R.version$minor, "\\.")[[1]][1], sep =
    "."),
  use_renv = TRUE,
  use_targets = TRUE,
  use_ci = TRUE,
  lang = "es",
  open = rlang::is_interactive()
)

Arguments

path

Character. Path where the project will be created. The last component becomes the project name. The directory must not already exist (use open = TRUE to open an existing project).

author

Character. Your name, used in YAML front matter. Defaults to getOption("usethis.full_name") or Sys.getenv("USER").

gitlab_user

Character. Your GitLab username, used in CI templates and ⁠_quarto.yml⁠ base URL. Defaults to Sys.getenv("GITLAB_USER").

r_version

Character. Minimum R version to declare in bootstrap.R. Defaults to the currently running version, e.g. "4.4.0".

use_renv

Logical. Initialize renv? Default TRUE.

use_targets

Logical. Create ⁠_targets.R⁠? Default TRUE.

use_ci

Logical. Create .gitlab-ci.yml? Default TRUE.

lang

Character. Language for project templates. One of "es" (Spanish, default) or "en" (English).

open

Logical. Open the project in RStudio/Positron after creation? Default TRUE when called interactively.

Value

Invisibly, the path to the created project.

Examples

## Not run: 
# Minimal call - project name taken from path
create_project("~/projects/my_analysis")

# Full call with explicit metadata
create_project(
  path        = "~/projects/encuesta_2026",
  author      = "Ana Garcia",
  gitlab_user = "anagarcia",
  r_version   = "4.4.0"
)

## End(Not run)