reformat_db | R Documentation |
Format the package database
reformat_db(db, version = NULL)
db |
A data frame returned from |
version |
Version of the database, a self-defined text. |
It reformats the data frame of the package database into a pkg_db
class object.
A pkg_db
class object. There are the following methods:
pkg_db$get_meta(package,field=NULL)
field
can take values in "Package", "Version" and "Repository".
pkg_db$get_dependency_table(package)
Get the dependency table.
pkg_db$get_rev_dependency_table(package)
Get the reverse dependency table.
pkg_db$package_dependencies(package,recursive=FALSE,reverse=FALSE,which="strong",simplify=FALSE)
All the arguments are the same as in package_dependencies
. Argument simplify
controls whether to return a data frame or a simplied vector.
## Not run:
db = available.packages()
db2 = reformat_db(db)
# a pkg_db object generated on 2021-10-28 can be loaded by load_pkg_db()
db2 = load_pkg_db(online = FALSE)
db2
db2$get_meta("ComplexHeatmap")
db2$get_dependency_table("ComplexHeatmap")
db2$get_rev_dependency_table("ComplexHeatmap")
db2$package_dependencies("ComplexHeatmap")
db2$package_dependencies("ComplexHeatmap", recursive = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.