I have a large data sets stored on a server and need it analysed using R. I don't have permissions to change or install packages to the already available R, so I've designated a folder in my personal server storage, "/R_packages" where I can deposit packages my R script relies on. For some packages, the formula
> if (!require("devtools")) install.packages("devtools", repos = "http://cran.us.r-project.org", lib="/loc/R_packages")
works. However, I'm not sure I am doing it right specifying the repository for bioconductor packages (I need to use rtracklayer::import() ) and where to deposit libraries. The .Rout file stores this output:
> if (!require("BiocManager", quietly = TRUE))
+ install.packages("BiocManager",lib="/loc/R_packages")
Error in contrib.url(repos, type) :
trying to use CRAN without setting a mirror
Calls: install.packages -> grep -> contrib.url
In addition: Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'BiocManager'
Execution halted
tail: mainScript.Rout: file truncated
trying URL 'http://cran.us.r-project.org/src/contrib/BiocManager_1.30.18.tar.gz'
Content type 'application/x-gzip' length 289602 bytes (282 KB)
==================================================
downloaded 282 KB
During startup - Warning message:
Setting LC_CTYPE failed, using "C"
* installing *source* package 'BiocManager' ...
** package 'BiocManager' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
converting help for package 'BiocManager'
finding HTML links ... done
BiocManager-pkg html
available html
install html
repositories html
valid html
version html
** building package indices
** installing vignettes
** testing if installed package can be loaded
During startup - Warning message:
Setting LC_CTYPE failed, using "C"
* DONE (BiocManager)
The downloaded source packages are in
'/var/tmp/pbs.9977839.bias5-adm/RtmpB7VvjD/downloaded_packages'
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'BiocManager'
> BiocManager::install()
Error in loadNamespace(name) : there is no package called 'BiocManager'
Calls: :: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
^C
(base) [devil@bias5-login R_Analysis]$ less mainScript.Rout
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
converting help for package 'BiocManager'
finding HTML links ... done
BiocManager-pkg html
available html
install html
repositories html
valid html
version html
** building package indices
** installing vignettes
** testing if installed package can be loaded
During startup - Warning message:
Setting LC_CTYPE failed, using "C"
* DONE (BiocManager)
The downloaded source packages are in
'/var/tmp/pbs.9977839.bias5-adm/RtmpB7VvjD/downloaded_packages'
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'BiocManager'
> BiocManager::install()
Error in loadNamespace(name) : there is no package called 'BiocManager'
Calls: :: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted