Verified packages installed

Lets say I just install "rstan" on the command line on Ubuntu:

sudo ap-get update
apt-get install r-cran-rstan

How do I verify on the R console if it has been installed? If I run > install.packages ("stan"), it seems like it is doing the entire installation again.

Edit: I just noticed the packages tab. Is that represent all the packages installed on my server?

TT

This installs a precompiled binary from the deb repository

If you haven't changed your default package repository, this will compile the package from source.

As long as you are logged with the same system user the result is the same, although if you install from the deb repo with sudo, you might be installing into the site-library folder.

Yes

My understanding is if its run at the OS terminal by sudo its systemwide. Does each single user who logs into R console need to still initiate the download by the command install.packages ("xx") or Tools --> Install packages?

For example last year after I installed tidyverse from sudo, when user went to the Tools --> Install packages, the process was faster (compared to before). Somehow the installation of the rstan package today from sudo hasn't increased the speed for each single user that logs into R.

TT

No, as long as the user has access to the R_LIBS_SITE library folder they no longer need to install the package locally, by running the install command you will only achieve to install the package twice, in the site library and in the user's personal library.

This is not true unless you are using renv and the install command is being masked by it.

Andresrcs,

So you saying that if the package was installed from a terminal using sudo and users who have access to the R_LIBS_SITE folder, the package should be shown on the packages tab on the R Console without doing anything?

If their libPaths point to R_LIBS_SITE, then yes, I believe that environment variable is set by default on the latest R versions but it would be better if you check yourself.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.