*** getDependencies.R.orig	2010-04-23 14:43:53.361078503 -0400
--- getDependencies.R.new2	2010-04-23 15:38:24.078078387 -0400
***************
*** 1,6 ****
- 
  getDependencies <-
!     function(pkgs, dependencies = NA, available = NULL, lib = .libPaths()[1L])
  {
      oneLib <- length(lib) == 1L
      if(is.logical(dependencies) && is.na(dependencies))
--- 1,5 ----
  getDependencies <-
!     function(pkgs, dependencies = NA, available = NULL, installed = NULL , verbose = TRUE , lib = .libPaths()[1L])
  {
      oneLib <- length(lib) == 1L
      if(is.logical(dependencies) && is.na(dependencies))
***************
*** 41,46 ****
--- 40,46 ----
          ## Here we are slightly more conservative
          libpath <- .libPaths()
          if(!lib %in% libpath) libpath <- c(lib, libpath)
+         if ( missing(installed) || is.na(installed) ) 
          installed <- installed.packages(lib.loc = libpath,
                                          fields = c("Package", "Version"))
          not_avail <- character()
***************
*** 72,83 ****
          pkgs <- pkgs[pkgs %in% row.names(available)]
          if(length(pkgs) > length(p0)) {
              added <- setdiff(pkgs, p0)
!             message(sprintf(ngettext(length(added),
!                                      "also installing the dependency %s",
!                                      "also installing the dependencies %s"),
!                             paste(sQuote(added), collapse=", ")),
!                     "\n", domain = NA)
!             flush.console()
          }
          p0 <- pkgs
      }
--- 72,85 ----
          pkgs <- pkgs[pkgs %in% row.names(available)]
          if(length(pkgs) > length(p0)) {
              added <- setdiff(pkgs, p0)
!             if ( verbose ) {
!               message(sprintf(ngettext(length(added),
!                                        "also installing the dependency %s",
!                                        "also installing the dependencies %s"),
!                               paste(sQuote(added), collapse=", ")),
!                       "\n", domain = NA)
!               flush.console()
!             }
          }
          p0 <- pkgs
      }
