[ESS] Small bug in R function argument tips

Erik Iverson iverson at biostat.wisc.edu
Wed Jan 30 20:22:51 CET 2008


Hello -

I get much use out of the R function argument tips now included in ESS, 
so thanks to those that worked on that.

I'm using ESS 5.3.6 with XEmacs 21.5 (Beta 24) on RHEL 4 (Linux), R 
version 2.6.1.

It appears that if a default argument value includes the "%" character, 
the function tips do not work correctly. To see this, try:

essTest <- function(x = "%")
{
   paste(100, x, sep = "")
}

and then do (in a .R buffer with ESS loaded and an R process running)

essTest(

The following is displayed in the minibuffer:

Syntax error: Invalid converter character, ?\"

There is another similar (probably related?) case.  This one will occur 
if there is a printf-style format specifier in the default argument list.

To see that error, try

essTest2 <- function(x = "%f")
{
   paste(100, x, sep = "")
}

essTest2(

then gives in the minibuffer:

Wrong number of arguments: format, 0, "ARGS: x = \"%d\""

However, replacing %f by, say, %z (not a printf-style format specifier) 
in the above example would lead to an error message like the first.

I hope this is the right forum for reporting this.  It certainly does 
not affect me greatly, I just thought someone might like to know about 
it.  I originally found this by using the pdf function.

I also tested this on (regular) Emacs, and got the same error message in 
both cases, which was:

Not enough arguments for format string

Best,
Erik Iverson




More information about the ESS-help mailing list