This repository is a template for a
docker
-containerised,
{targets}
-based,
{renv}
-enabled
R
workflow for Seychelles cancer
quality of care scoping review.
The project repository is structured as follows:
sc-ca-qoc-review
|-- .github/
|-- data/
|-- data-raw/
|-- outputs/
|-- R/
|-- renv
|-- reports
|-- _targets.R
|-- .Rprofile
|-- packages.R
|-- renv.lock
-
.github
contains project testing and automated deployment of outputs workflows via continuous integration and continuous deployment (CI/CD) using Github Actions. -
data/
contains intermediate and final data outputs produced by the workflow. -
data-raw/
contains raw datasets, usually either downloaded from source or added manually, that are used in the project. -
outputs/
contains compiled reports and figures produced by the workflow. -
R/
contains functions developed/created specifically for use in this workflow. -
renv/
containsrenv
package specific files and directories used by the package for maintaining R package dependencies within the project. The directoryrenv/library
, is a library that contains all packages currently used by the project. This directory, and all files and sub-directories within it, are all generated and managed by therenv
package. Users should not change/edit these manually. -
reports/
contains literate code for R Markdown and/or Quarto reports rendered in the workflow. -
_targets.R
file defines the steps in the workflow’s data ingest, data processing, data analysis, and reporting pipeline. -
.Rprofile
file is a project R profile generated when initiatingrenv
for the first time. This file is run automatically every time R is run within this project, andrenv
uses it to configure the R session to use therenv
project library. -
packages.R
file lists out all R package dependencies required by the workflow. -
renv.lock
file is therenv
lockfile which records enough metadata about every package used in this project that it can be re-installed on a new machine. This file is generated by therenv
package and should not be changed/edited manually.
This project was built using R 4.5.1. To manage R versions, it is
recommended to use rig
- an R
installation manager - to be able to install multiple versions of R and
switch between them as needed.
This project uses the {renv}
framework to record R package
dependencies and versions. Packages and versions used are recorded in
renv.lock
and code used to manage dependencies is in the renv
directory and other files in the root project directory.
On starting an R session in the working directory of this repository, first run
renv::restore()
to install R package dependencies.
The current workflow has the following steps:
graph LR
style Graph fill:#FFFFFF00,stroke:#000000;
subgraph Graph
direction LR
x302aac5a349e94c8(["extraction_matrix_data"]):::skipped --> xf69487b7eb1bdf74(["data_review_report"]):::completed
x81531a598a877851(["extraction_matrix_data_file"]):::skipped --> x302aac5a349e94c8(["extraction_matrix_data"]):::skipped
xa1f98815230ee6ce(["sids_list"]):::skipped --> xe888894c32b82646(["sids_islands"]):::skipped
end
To run the workflow, issue the following command in R from within the project directory
targets::tar_make()
or issue the following command in Terminal from within the project directory
Rscript -e "targets::tar_make()"
- Dr Nyasha Manyeruke - University of Oxford
- Dr Johanna Rapanarilala - Oncology Unit, Ministry of Health, Seychelles
- Dr Sylvie Pool - Ministry of Health, Seychelles and University of Oxford
- Dr Ernest Guevarra - University of Oxford
All code in this workflow is released under a GPL-3.0 license. All text and reports in this workflow is released under a CC-BY-4.0 license. All data is released under a CC0 license.