DesiQuintans / librarian

Install, Update, Load Packages from CRAN, Bioconductor, and GitHub in One Step.
GNU General Public License v3.0
54 stars 1 forks source link

Requested feature: Option to install missing packages without loading them #26

Closed GitHunter0 closed 3 years ago

GitHunter0 commented 4 years ago

@DesiQuintans , very often I just want to make sure the packages are installed but I do not want them loaded because it would pollute the namespace environment. Once the missing packages are installed, I like to access the packages functions via double colons :: to avoid conflicting names.

I have not found this valuable feature (at least for me) in any other package. Would you consider implementing that?

Thank you.

PS: Congratulations for the package, librarianis very useful.

DesiQuintans commented 4 years ago

Hi, it's already there! librarian::check_installed() and librarian::check_attached() can check whether a package is installed and/or attached. librarian::check_installed() will take some time to run when you call it the first time because it's searching all of your library paths, but the results get cached and subsequent runs will be near instant.

GitHunter0 commented 4 years ago

Hey @DesiQuintans , thank you for the response. The issue is that those functions only check if the specified packages are installed, I would like one that also installs the missing packages automatically on the fly.

DesiQuintans commented 4 years ago

Oh I see, you want something like shelf() that checks and installs packages, but does not automatically attach them. Yeah I can look at that.

GitHunter0 commented 4 years ago

Oh I see, you want something like shelf() that checks and installs packages, but does not automatically attach them. Yeah I can look at that.

Exactly! @DesiQuintans, I appreciate if you could implement something like that, it would be very useful to me.