Suvar
Suvar

Reputation: 341

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")

Upvotes: 1

Views: 91

Answers (1)

Andrey Shabalin
Andrey Shabalin

Reputation: 4614

One can get help for the biocLite function with:

?biocLite

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

biocLite(ask = FALSE)

Upvotes: 1

Related Questions