Checking/updating package versions
Entering edit mode
bertb • 0
Last seen 3 days ago


I have a very simple question: how can I check my version of an installed package - in this case DiffBind? I know a simple -v in Unix achieves this, but I can't seem to figure it out in R.

Part of the reason I need to know is because I think my version is out of date now and I need to upgrade. Is there a way to do this without uninstalling and reinstalling the new one? And if I do need to uninstall/reinstall, is there a specific uninstaller, or specific procedure for uninstalling?

Thank you!

DiffBind • 113 views
Entering edit mode
Last seen 2 days ago
United States

Or more to the point


After which you can do what valid says you need to do (if anything at all) to make your install valid.

Entering edit mode

Thanks James!

When I run


the output I get details all the packages I have, and at then end how I can update (I think):

Bioconductor version '3.11'

  * 9 packages out-of-date
  * 0 packages too new

create a valid installation with

    "backports", "colorspace", "data.table", "diffobj", "ggrepel", "jsonlite", "rlang", "V8", "vctrs"
  ), update = TRUE, ask = FALSE)

more details: BiocManager::valid()$too_new, BiocManager::valid()$out_of_date

Warning message:
9 packages out-of-date; 0 packages too new

but when I run the above command, and check with BiocManager::valid() , I still receive the same packages that aren't updating. When new versions try to install, I get the following warning

Warning: cannot remove prior installation of package 'V8'
Warning: restored 'V8'

for each package

Is there something else I need to do to update these properly? Thanks again

Entering edit mode

Well, ideally you would install R-4.0.3 and Bioconductor 3.12 because you need to update. Failing that, you should restart R and try again. Usually when you can't remove a prior installation it's because the package is loaded by R.

Entering edit mode

I see - thanks. I was running Bioconductor 3.11, so I think that was the issue. When I installed 3.12, almost everything installed properly (latest versions of 3 packages were available with source only). However, part of the output did include:

Installation path not writeable, unable to update packages: codetools, foreign, KernSmooth, Matrix, nlme

...which is curious to me since the downloading path seems basically automated (that is, I haven't specified anything) and all the binary packages are going to \downloaded_packages. I'm just wondering why only these packages would have an issue with the installation path?

Thanks again

Entering edit mode

Usually on Windows you install R as a privileged user, and the recommended packages (which include all those listed) are also installed in a privileged location that you as a normal user don't have write privileges. Then when you install other packages R chooses a directory that you do have write privileges (on Win10 it's in C:/<yourusername>/AppData/Roaming/R/win-library/4.0, or at least is there on my box).

So if you do this:

> .libPaths()
[1] "C:/Users/jmacdon/AppData/Roaming/R/win-library/4.0"
[2] "C:/Program Files/R/R-4.0.0/library"

You can see that there are two library paths, the first one being your 'local' path to which you have privileges, and the second one being in a place that can only be written to if you invoke admin privileges. An alternative that you sometimes hear people talking about is to run R with admin privileges so you can just have one library dir, but that in general is a horrible idea. You should always use the lowest privilege level possible so you don't inadvertently bork your machine. Or allow nefarious actors easy access to do that for you.

Entering edit mode

Ok - I'm learning a lot. I'm the only one using R - for now - but perhaps it would be good practice to periodically run as an admin in order to update regularly.

Thanks again for taking the time with this line of questions


Login before adding your answer.

Similar Posts
Loading Similar Posts
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.3