I am trying to install a bioconductor package (XVector). Bioconductor version is 3.16, and the package is available for it as the link is confirming that (https://bioconductor.org/packages/release/bioc/html/XVector.html)
BiocManager::install("XVector")
but it pops an error:
Warning: unable to access index for repository https://bioconductor.org/packages/3.16/bioc/src/contrib:
cannot open URL 'https://bioconductor.org/packages/3.16/bioc/src/contrib/PACKAGES'
Installation paths not writeable, unable to update packages
Installation paths not writeable, unable to update packages
path: C:/Program Files/R/R-4.2.2/library
packages:
boot, foreign, Matrix, nlme, survival
Warning message:
package ‘XVector’ is not available for Bioconductor version '3.16'
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
In my library, I have two paths:
.libPaths()
[1] "C:/R" "C:/Program Files/R/R-4.2.2/library"
By default my library location is C:/R
, which I created on my own and there I was able to install some other packages normally. I also edited the variable name (R_LIBS_USER
) and value (C:/R
), and edited them to be for the first directory
How can I delete the C/program file location? I observed that R are not able to load the libraries in that user-created folder and tends to reinstall it in the C/program file? But why? The solution would be to delete the C/program location and force R to only install and load libraries in my folder.
Any suggestions?