From Friedrich.Leisch at stat.uni-muenchen.de  Mon Jul 10 12:28:35 2006
From: Friedrich.Leisch at stat.uni-muenchen.de (Friedrich Leisch)
Date: Mon, 10 Jul 2006 12:28:35 +0200
Subject: [Rd] vignette("introduction") causes "Error in sprintf("
	(PR#9069)
In-Reply-To: <44B14925.4020800@psyctc.org>
References: <20060709174039.B9DCC54ACE@slim.kubism.ku.dk>
	<971536df0607091102g27205555m64b8e572ec8c0b6d@mail.gmail.com>
	<44B14925.4020800@psyctc.org>
Message-ID: <17586.11219.484965.351102@celebrian.ci.tuwien.ac.at>

>>>>> On Sun, 09 Jul 2006 19:21:25 +0100,
>>>>> Chris Evans (CE) wrote:

  > Gabor Grothendieck sent the following  at 09/07/2006 19:02:
  >> Same for me.  Looking through the output of vignette
  >> I noticed that both the ggplot and reshape packages have
  >> a vignette called "introduction" in my case and either of
  >> the following brings up the associated vignette (as opposed
  >> to the error message):
  >> 
  >> vignette("introduction", "ggplot")
  >> vignette("introduction", "reshape")

  > Aha, works for me too.  Sorry, I probably should have been able to work
  > that out myself.

  > So: not so much a bug, more a wish as it might be good if the vignette
  > code checked for multiple vignettes with the same name and returned a
  > choice or a message warning you that there are multiples.


A simple traceback shows that the bug was actually in code trying
to do exactly what you suggest ;-)

R> vignette("introduction")
Error in sprintf(gettext(fmt, domain = domain), ...) : 
	use format %s for character objects
R> traceback()
4: sprintf(gettext(fmt, domain = domain), ...)
3: gettextf("vignette '%d' found more than once,\nusing the one found in '%s'", 
       topic, dirname(pdf[idx]))
2: warning(gettextf("vignette '%d' found more than once,\nusing the one found in '%s'", 
       topic, dirname(pdf[idx])), call. = FALSE, domain = NA)
1: vignette("introduction")



Fixed now in both r-patched and r-devel.

Fritz



[Rd] vignette("introduction") causes "Error in sprintf(" (PR#9069)
Friedrich Leisch