openpharma / staged.dependencies

R package to implement development stages for package development
https://openpharma.github.io/staged.dependencies/
MIT License
12 stars 3 forks source link

Add a simple function to install upstream dependencies without RStudio addin #156

Open danielinteractive opened 2 years ago

danielinteractive commented 2 years ago

Yesterday I could not use RStudio, so tried to use staged dependencies just from the R console. However I did not find the function to call quickly to install upstream dependencies. Also looking at the output from the addin: image it seems like there is no quick simple function call that one can use.

Generally I would recommend to get a bit more independent of the RStudio IDE so that also users from other IDEs or console can use staged.dependencies nicely.

kpagacz commented 2 years ago

staged.dependencies is independent of RStudio IDE. They provide functions to do everything the plugin can do and more.

Here are the docs: https://openpharma.github.io/staged.dependencies/reference/index.html

And here's my wrapper around staged.deps that I use on a daily basis in VSCode:

staged.install <- function(package) {
  staged.dependencies::install_deps(staged.dependencies::dependency_table(package))
}

where package is the system file path to the package being installed.

EDIT: There's also a short tutorial on using staged.dependencies in console: https://openpharma.github.io/staged.dependencies/#console

danielinteractive commented 2 years ago

Thanks @kpagacz ! That is a nice start. I would suggest then to add something like staged.install() directly to the package.