A convenient function to install R packages from CRAN or Bioconductor. It tries both repositories and throws failure if failed in both cases.

install_package(pkg)

Arguments

pkg

A length-one character vector containing package name