FredHutch / VISCtemplates

Tools for writing reproducible reports at VISC
Other
4 stars 2 forks source link
visc

VISCtemplates

The goal of VISCtemplates is to:

Installation

The package is available on the Fred Hutch organization GitHub page.

remotes::install_github("FredHutch/VISCtemplates")

# install the package with vignettes:
remotes::install_github("FredHutch/VISCtemplates", build_vignettes = TRUE)

Requirements

Vignettes

The package vignettes will guide you through setting up an analysis project with VISCtemplates and usethis and using a VISC report template.

vignette("using_pdf_and_word_template")
vignette("create_a_visc_analysis_project")

Usage

Many of the functions in this package build on functions from usethis and rmarkdown. Like usethis, most use_*() functions operate on the active project. VISCtemplates is designed to be used interactively.

The main functions in VISCtemplates are create_visc_project(), for setting up analysis projects, and use_visc_report(), for using VISC report templates. Take a look at the package vignettes for more details.

Create an analysis project:

path <- "~/mydir/VDCnnnAnalysis"

create_visc_project(path)

Use a VISC Report:

use_visc_report(
  report_name = "VDCnnn_BAMA_PT_Report_statusifapplicable", # the name of the report file
  path = "BAMA", # the path within the active directory, usually the name of the assay
  report_type = "bama" # "empty", "generic", or "bama" 
)

Why use an R package structure?

The R package structure is used for analysis projects because it provides an easily recognizable format for file organization and allows for the use of packages like devtools and roxygen2. For more information, see:

  1. Ben Marwick, Carl Boettiger, and Lincoln Mullen. Paper: Packaging data analytical work reproducibily using R (and friends)
  2. Karthik Ram. Rstudio::conf 2019 talk: How To Make Your Data Analysis Notebooks More Reproducible
  3. rOpenSci Community Call: Reproducible Research with R