Hello,
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!
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):
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 warningfor each package
Is there something else I need to do to update these properly? Thanks again
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.
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:
...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
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:
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.
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