use_bioc_vignette: Create a biocthis-style vignette template

View source: R/use_bioc_vignette.R

use_bioc_vignetteR Documentation

Create a biocthis-style vignette template

Description

This function is very similar to usethis::use_vignette() except that it uses a template from biocthis. This template includes instructions for citing other packages using RefManageR, uses sessioninfo::session_info() for displaying the R session information since it includes GitHub installation information and other useful details. The template also includes a section on how to ask for help and required knowledge.

Usage

use_bioc_vignette(name, title = name)

Arguments

name

Just like in usethis::use_vignette(): base for file name to use for new vignette. Should consist only of numbers, letters, _ and -. Lower case is recommended.

title

Just like in usethis::use_vignette(): the title of the vignette.

Value

This function adds and/or replaces the ⁠vignettes/<name>.Rmd⁠ file in your R package.

Examples

## Not run: 
## Run this function in your package
pkg <- basename(usethis::proj_get())
biocthis::use_bioc_vignette(pkg, paste("Introduction to", pkg))

## End(Not run)

## Create an example package for illustrative purposes.
## Note: you do not need to run this for your own package!
pkgdir <- biocthis_example_pkg()

## Create a template vignette file that is Bioconductor-friendly
biocthis::use_bioc_vignette("biocthisexample", "Introduction to biocthisexample")

lcolladotor/biocthis documentation built on Jan. 17, 2024, 8:07 p.m.