Dear all,
I am having some issues with the installation of some packages. I have written an R package that I would like to share with some computer-reluctant biologists. To make it easy, I have written a simple R function to install all required packages (see below with limited number of packages for the example).
install_packages <- function(){
# Open R and install packages
local({r <- getOption("repos")
r["CRAN"] <- "http://cran.r-project.org"
options(repos=r)
})
# Define a vector with the names of all required packages
package <- c( 'AnnotationDbi', 'caTools', 'edgeR', 'GenomicRanges', 'GenomicAlignments', 'gtools', 'Rsamtools', 'VennDiagram' )
# Install required packages
for(k in 1:length(package)){
cat("\n\t\t", k, ".\t Installing ", package[k], sep='')
install.packages(package[k], dependencies=TRUE);
}
}
It works well for most standard packages, but some packages are problematic, giving me error messages of this kind:
package ‘edgeR’ is not available (for R version 3.1.2)
I have tried a gazillion things, but I can’t figure out why I get these ‘warnings’ and don’t understand why they are not ‘errors’. Any help would be greatly appreciated.
Thanks,
Patrick
PS: I know that these packages are installed on my machine, but I am trying to do this for other computers. Thanks.
sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] grid parallel stats4 stats graphics grDevices utils
[8] datasets methods base
other attached packages:
[1] VennDiagram_1.6.9 gtools_3.4.1 GenomicAlignments_1.2.1
[4] Rsamtools_1.18.2 Biostrings_2.34.1 XVector_0.6.0
[7] GenomicRanges_1.18.4 edgeR_3.8.5 limma_3.22.4
[10] caTools_1.17.1 AnnotationDbi_1.28.1 GenomeInfoDb_1.2.4
[13] IRanges_2.0.1 S4Vectors_0.4.0 Biobase_2.26.0
[16] BiocGenerics_0.12.1
loaded via a namespace (and not attached):
[1] base64enc_0.1-2 BatchJobs_1.5 BBmisc_1.9 BiocParallel_1.0.3
[5] bitops_1.0-6 brew_1.0-6 checkmate_1.5.1 codetools_0.2-10
[9] DBI_0.3.1 digest_0.6.8 fail_1.2 foreach_1.4.2
[13] iterators_1.0.7 RSQLite_1.0.0 sendmailR_1.2-1 stringr_0.6.2
[17] tools_3.1.2 zlibbioc_1.12.0
hahaha, yeah, let's not talk about that ;-)
Thanks!