Re: [Rd] % symbol in .Rd files?

From: Dominick Samperi <>
Date: Thu 27 Jul 2006 - 11:52:36 GMT

Martin Maechler wrote:
>>>>>> "Dominick" == Dominick Samperi <>
>>>>>> on Mon, 24 Jul 2006 13:07:29 -0400 writes:
> Dominick> Hello, I am encountering problems when there is a
> Dominick> '%' character in package .Rd files. More
> Dominick> precisely, CRAN is having problems with these
> Dominick> characters when running check, whereas I am not
> Dominick> seeing any problems under Linux and Windows. I
> Dominick> did see these problems, and found that escaping
> Dominick> the %'s fixes the problem in my testing, but
> Dominick> apparently this does not fix the problem when
> Dominick> check is run at CRAN.
> Dominick> I suspect that there are some compatibility
> Dominick> problems between shells, TeX, or perl versions, or
> Dominick> perhaps the check on CRAN goes through more levels
> Dominick> of preprocessing?
> Dominick> I can probably fix this problem by removing all
> Dominick> '%' chars from my .Rd files, but this doesn't seem
> Dominick> like a very natural solution.
> definitely not. Other packages have them as well,
> without giving any CRAN hickups
> No, you should find and fix the problem.
> Dominick> Any ideas?
> We need examples which -- at least for you -- produce the
> problem. You could post a small tar file (mime-types 'application/x-tar'
> or 'application/x-compressed-tar' are accepted for R-devel) if
> you want.
> Martin Maechler, ETH Zurich
An example of the '% problem' is provided by the RcppExample.Rd file that is part of the RcppTemplate package (V4.2). There you will find:

# Note that we need to escape the percent sign here... datestr <- c('2006-6-10', '2006-7-12', '2006-8-10') datevec <- as.Date(datestr, "\%Y-\%m-\%d") # date vector

Without the escaped '%' signs I get an obscure error message when I run:
 > example(RcppExample)

Here is the error message:
Error in parse(file, n = -1, NULL, "?") : syntax error at 36:  


There was another problem with this package (now fixed) that was showing up on CRAN, but not in my testing. This was due to the fact that the latest version of r-devel includes some new type checking, so an error was caught at CRAN, but not in my testing (I use the standard version of R). This problem was unrelated to the '% problem'.

ds mailing list Received on Thu Jul 27 23:10:14 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 27 Jul 2006 - 16:30:50 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.