[Rd] Buglet in install.packages warning message

Seth Falcon
2005-03-21T03:34:24Z

I've been experimenting with install.packages and it's new ability to
track down dependencies from a list of repositories and encountered
this:

install.packages(c("foo", "bar"),
repos="http://cran.r-project.org",
                 dependencies=c("Depends", "Suggests"))

dependencies 'foo' are not availabledependencies 'bar' are not
available
                           ^^^^^^^^^^^^^^^^^^^^

With the following change (see below) I get what I suspect is the
intended warning message:

   dependencies 'foo', 'bar' are not available


+ seth


Index: packages2.R
==================================================================---
packages2.R	(revision 33678)
+++ packages2.R	(working copy)
@@ -125,7 +125,7 @@
                 cat(sprintf(ngettext(sum(miss),
                                      "dependency %s is not
available",
                                      "dependencies %s are not
available"),
-                    paste(sQuote(p1[miss]), sep=", ")),
"\n\n", sep ="")
+                    paste(sQuote(p1[miss]), collapse=", ")),
"\n\n", sep ="")
                 flush.console()
             }
             p1 <- p1[!miss]