The goal of VISCtemplates is to:
- automate project setup
- provide a common, easy-to-understand directory structure across analyses
- provide consistency across VISC reports
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)
- R (version >= 3.0)
- RStudio (version >= 1.2)
- Includes Pandoc (version >= 2.0), which is needed for Word reports.
- TinyTeX (or MiKTeX), which is needed for PDF reports.
install.packages(“tinytex”)
tinytex::install_tinytex()
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")
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", "bama", or "nab"
)
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:
- Ben Marwick, Carl Boettiger, and Lincoln Mullen. Paper: Packaging data analytical work reproducibily using R (and friends)
- Karthik Ram. Rstudio::conf 2019 talk: How To Make Your Data Analysis Notebooks More Reproducible
- rOpenSci Community Call: Reproducible Research with R