ThinkR-open / attachment

Tools to deal with dependencies in scripts, Rmd and packages
https://thinkr-open.github.io/attachment/
Other
108 stars 13 forks source link

install_if_missing is not compatible with renv #45

Closed VincentGuyader closed 2 years ago

VincentGuyader commented 2 years ago

after renv::activate() install_if_missing() will not detect missing pacakge.

because find.package dont use {renv} libPaths

see :

image

VincentGuyader commented 2 years ago

we can do :

already_installed <- basename(try(find.package(to_be_installed, quiet = TRUE,lib.loc = .libPaths()), silent = TRUE))

statnmap commented 2 years ago

Closed with https://github.com/ThinkR-open/attachment/commit/60fa932f099b82a95d04d82cf0dbd652299a0816