#' Find available packages
#'
#' This function is a wrapper for the base \code{available.packages}.
#'
#' @export
#'
#' @author VP Nagraj (\email{vpnagraj@virginia.edu})
#'
#' @param source specify the source for the packages
#'
#' @param ... further parameters to be passed to the \code{\link{available.packages}} function
#'
#' @examples
#' \dontrun{
#'available_packages(source = "CRAN")
#'}
available_packages <- function(source = "CRAN", ...) {
sources <- c("CRAN", "Bioconductor")
if (source == "CRAN") {
utils::available.packages(...)
# } else if (source == "Bioconductor") {
# cat("will look for bioconductor packages")
} else {
stop(paste0("valid 'source' arguments include:",
sapply(sources, paste0, "\n"),
collapse = "\n")
)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.