basedir <- "/loc/www/bioconductor-test.fhcrc.org/course-packages/" dirs <- list(source = "src/contrib", win.binary = "bin/windows/contrib/2.12", mac.binary = "bin/macosx/leopard/contrib/2.12") doit <- function(type, dir) { fulldir <- paste(basedir, dir, sep="") tools:::write_PACKAGES(fulldir, verbose=TRUE, type=type) } mapply(doit, names(dirs), dirs)