Last active
July 15, 2019 18:46
-
-
Save mikelove/87c7e222870e2b41e3986d2065018992 to your computer and use it in GitHub Desktop.
Get the missing packages from Suggests from R package DESCRIPTION
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get_deps <- function(what="Suggests") { | |
deps <- desc::desc_get_deps() | |
suggests <- deps$package[deps$type==what] | |
setdiff(suggests, sub(".*/","",find.package(suggests, quiet=TRUE))) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This function is useful if you want to work on a package but you need to install it's
Suggests
packages to build the vignette.You first need the desc package to run the function. You can install it with
install.packages("desc")
.The idiom is: