
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, ...)# S3 method for default
as_pkgrefs(x, ...)
# S3 method for character
as_pkgrefs(x, bioc_version = NULL, no_enhances = TRUE, no_suggests = TRUE, ...)
# S3 method for sessionInfo
as_pkgrefs(x, ...)
a vector of package references
currently supported data structure(s) are: output from sessionInfo()
, a character vector of package names
not used
character. When x is a character vector, version of Bioconductor to search for package names. NULL indicates not search for Bioconductor.
logical, when parsing DESCRIPTION, whether to ignore packages in the "Enhances" field
logical, when parsing DESCRIPTION, whether to ignore packages in the "Suggests" field
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
}
Run the code above in your browser using DataLab