Reputation: 1466
I want to give a beta version of my package to a coworker for testing purposes.
I build the package and put the .zip
file on the Network Folder.
The Problem is, how to tell R that it should install the package from the ZipFile but its dependencies from CRAN?
install.packages("path\\to\\zipfile.zip", source = TRUE, repos = NULL)
Because repos = null
disables the dependency resultion. If under stand the documentation correctly:
dependencies
logical indicating whether to also install uninstalled packages which these packages depend on/link to/import/suggest (and so on recursively). Not used if repos = NULL. Can also be a character vector, a subset of c("Depends", "Imports", "LinkingTo", "Suggests", "Enhances").
I would like to give the coworker a short snippet of code to install for himself without him having to interact further with the installation.
Upvotes: 0
Views: 139
Reputation: 1466
As the Imports or dependencies might change in later development, i would prefer not to hardcode them.
I found devtools::install()
which satisfies this requirement. Although it needs devtools.
Upvotes: 0