as_pkgrefs | R Documentation |
This generic function converts several standard data structures into a vector of package references, which in turn
can be used as the first argument of the function resolve()
. This function guessimates the possible sources of the
packages. But we strongly recommend manually reviewing the detected packages before using them for resolve()
.
as_pkgrefs(x, ...)
## Default S3 method:
as_pkgrefs(x, ...)
## S3 method for class 'character'
as_pkgrefs(x, bioc_version = NULL, no_enhances = TRUE, no_suggests = TRUE, ...)
## S3 method for class 'sessionInfo'
as_pkgrefs(x, ...)
x, |
currently supported data structure(s) are: output from |
..., |
not used |
bioc_version |
character. When x is a character vector, version of Bioconductor to search for package names. NULL indicates not search for Bioconductor. |
no_enhances |
logical, when parsing DESCRIPTION, whether to ignore packages in the "Enhances" field |
no_suggests |
logical, when parsing DESCRIPTION, whether to ignore packages in the "Suggests" field |
a vector of package references
as_pkgrefs(sessionInfo())
if (interactive()) {
require(rang)
graph <- resolve(as_pkgrefs(sessionInfo()))
as_pkgrefs(c("rtoot"))
as_pkgrefs(c("rtoot", "S4Vectors")) ## this gives cran::S4Vectors and is not correct.
as_pkgrefs(c("rtoot", "S4Vectors"), bioc_version = "3.3") ## This gives bioc::S4Vectors
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.