Search code examples
rbioinformaticsbioconductor

Install Bioconductor packages automation


I am trying to automate installation of Bioconductor and its different packages on my Ubuntu 16.04 from R script. However, each installation needs interaction to say -y, yes I want to install it and -a to update all. Is there a way to automate installation? Something similar to shell's -y or yes | yes.

#!/usr/bin/Rscript

source("http://bioconductor.org/biocLite.R")    
biocLite()
biocLite("GenomicRanges")
biocLite("BiocGenerics")
biocLite("rtracklayer")

Solution

  • One can get help for the biocLite function with:

    ?biocLite
    

    It would show the ask parameter to skip all the questions.

    biocLite(ask = FALSE)