I'm not awesome at interpreting R functions and I'm using code from Callahan et al., 2017 to install Bioconductor packages. Their script is as follows:
.bioc_packages <- c("dada2", "phyloseq", "DECIPHER", "phangorn")
.inst <- .bioc_packages %in% installed.packages()
if(any(!.inst)) {
source("http://bioconductor.org/biocLite.R")
biocLite(.bioc_packages[!.inst], ask = F)
}
And I have two questions:
What does the syntax
if(any(!.inst))accomplish? I understand the structure of a function, but I don't know specifically what this particular section "means".Bioconductor is using BiocManager with R versions greater than 3.5 (I'm on 4.1.2) so the above code gives me the error:
With R version 3.5 or greater, install Bioconductor packages using BiocManager; see https://bioconductor.org/install
How may I edit the function to address this error?
Thank you!