getBiocViews: Build a list of BiocView objects from a package repository

View source: R/getPackNames.R

getBiocViewsR Documentation

Build a list of BiocView objects from a package repository

Description

Given the URL to a CRAN-style package repository containing a VIEWS file at the top-level and a graph-class object representing a DAG of views, this function returns a list of BiocView-class objects.

Usage

getBiocViews(reposUrl, vocab, defaultView, local = FALSE, htmlDir = "")

Arguments

reposUrl

URL for a CRAN-style repository that hosts a VIEWS file at the top-level.

vocab

A graph-class object representing the ontology of views. This graph should be a directed acyclic graph (DAG).

defaultView

A string giving the term to use for packages that do not list a term of their own via the biocViews field in the ‘DESCRIPTION’ file.

local

logical indicating whether to assume a local package repository. The default is FALSE in which case absolute links to package detail pages are created.

htmlDir

if the local argument is TRUE, this will be used as the relative path for package HTML files.

Value

A list of BiocView-class objects. The names of the list give the name of the corresponding view.

Author(s)

Seth Falcon

See Also

write_VIEWS, writeBiocViews

Examples

data(biocViewsVocab)
reposPath <- system.file("doc", package="biocViews")
reposUrl <- paste("file://", reposPath, sep="")
biocViews <- getBiocViews(reposUrl, biocViewsVocab, "NoViewProvided")
print(biocViews[1:2])

Bioconductor/biocViews documentation built on Oct. 29, 2023, 5:05 p.m.