BiocStyle (version 2.0.2)

macros: Link to packages on Bioconductor, CRAN and GitHub

Description

Functions for adding links to Bioconductor, CRAN and GitHub packages into R Markdown documents.

Usage

Biocpkg(pkg) CRANpkg(pkg) Githubpkg(repo, pkg) Rpackage(pkg)

Arguments

pkg
character(1), package name
repo
Repository address in the format username/repo[/subdir]

Value

Markdown-formatted character vector containing a hyperlinked package name.

Details

Use Biocpkg for Bioconductor software, annotation and experiment data packages. The function automatically includes a link to the release landing page or if the package is only in devel, to the devel landing page.

Use CRANpkg for R packages available on CRAN. The function automatically includes a link to the FHCRC CRAN mirror landing page.

Use Githubpkg for R packages available on GitHub. The repo should include the repository address in the format username/repo[/subdir]. If package is missing, the package name is assumed to be equal the repository name and is extracted from repo.

For R packages which are not available on Bioconductor, CRAN or GitHub use Rpackage.

Examples

Run this code

## link to a Bioconductor package
Biocpkg("IRanges")

## link to a CRAN package
CRANpkg("data.table")

## link to an R package on GitHub
Githubpkg("rstudio/rmarkdown")

Run the code above in your browser using DataCamp Workspace