diff --git a/R/sand-package.r b/R/sand-package.r index c812f62..e5a5aad 100644 --- a/R/sand-package.r +++ b/R/sand-package.r @@ -1,5 +1,6 @@ -#' sand -#' -#' @name sand -#' @docType package -NULL + +install_sand_packages <- function() { + pkgs <- strsplit(packageDescription("sand")$Suggests, "[, \n]+")[[1]] + source("http://bioconductor.org/biocLite.R") + biocLite(pkgs, suppressUpdates=TRUE, suppressAutoUpdate=TRUE) +} diff --git a/man/install_sand_packages.Rd b/man/install_sand_packages.Rd new file mode 100644 index 0000000..4f28c1a --- /dev/null +++ b/man/install_sand_packages.Rd @@ -0,0 +1,20 @@ +\name{install_sand_packages} +\alias{install_sand_packages} +\title{Install all packages used in the book} +\description{This function makes it easy to download and install + all R packages that are used in the book \sQuote{Statistical Analysis + of Network Data with R}. +} +\usage{ +install_sand_packages() +} +\details{ + The function uses the BioConductor installer, as this can + install both all required BioConductor and CRAN packages. +} +\value{ + Returns the names of the installed packages, invisibly. +} +\author{ + Gabor Csardi \email{csardi.gabor@gmail.com} +}