Skip to contents

This usethis-style function adds the infrastructure in a directory (presumably with R scripts and data) for (re)constructing the computational environment. Specifically, this function inserts inst/rang into the directory, which contains all components for the reconstruction. Optionally, Makefile and .here are also inserted to ease the development of analytic code. By default, (re)running this function does not overwrite any file. One can change this by setting force to TRUE.

Usage

use_rang(
  path = ".",
  add_makefile = TRUE,
  add_here = TRUE,
  verbose = TRUE,
  force = FALSE,
  apptainer = FALSE
)

Arguments

path

character, path to the project root

add_makefile

logical, whether to insert a barebone Makefile in the project root.

add_here

logical, whether to insert a hidden .here file in the project root

verbose

logical, whether to print out messages

force

logical, whether to overwrite files (inst/rang/update.R, Makefile, .here) if they exist.

apptainer

logical, whether to use apptainer. FALSE indicates using Docker

Value

path, invisibly

Details

The infrastructure being added to your path consists of:

  • inst/rang directory in the project root

  • update.R file inside the directory

  • .here in the project root (if add_here is TRUE)

  • Makefile in the project root (if add_makefile is TRUE) You might need to edit update.R manually. The default is to scan the whole project for used R packages and assume they are either on CRAN or Bioconductor. If you have used other R packages, you might need to edit this manually.