Hello, I am encountering problems when there is a '%' character in package .Rd files. More precisely, CRAN is having problems with these characters when running check, whereas I am not seeing any problems under Linux and Windows. I did see these problems, and found that escaping the %'s fixes the problem in my testing, but apparently this does not fix the problem when check is run at CRAN. I suspect that there are some compatibility problems between shells, TeX, or perl versions, or perhaps the check on CRAN goes through more levels of preprocessing? I can probably fix this problem by removing all '%' chars from my .Rd files, but this doesn't seem like a very natural solution. Any ideas? Thanks, ds
% symbol in .Rd files?
7 messages · Martin Maechler, Dominick Samperi
2 days later
"Dominick" == Dominick Samperi <dsamperi at decisionsynergy.com>
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
Martin Maechler wrote:
"Dominick" == Dominick Samperi <dsamperi at decisionsynergy.com>
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:
37:
>
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
"DoSa" == Dominick Samperi <dsamperi at decisionsynergy.com>
on Thu, 27 Jul 2006 07:52:36 -0400 writes:
DoSa> Martin Maechler wrote:
>>>>>>> "DoSa" == Dominick Samperi <dsamperi at decisionsynergy.com>
>>>>>>> on Mon, 24 Jul 2006 13:07:29 -0400 writes:
>>>>>>>
>>
DoSa> Hello, I am encountering problems when there is a
DoSa> '%' character in package .Rd files. More
DoSa> precisely, CRAN is having problems with these
DoSa> characters when running check, whereas I am not
DoSa> seeing any problems under Linux and Windows. I
DoSa> did see these problems, and found that escaping
DoSa> the %'s fixes the problem in my testing, but
DoSa> apparently this does not fix the problem when
DoSa> check is run at CRAN.
>>
DoSa> I suspect that there are some compatibility
DoSa> problems between shells, TeX, or perl versions, or
DoSa> perhaps the check on CRAN goes through more levels
DoSa> of preprocessing?
>>
DoSa> I can probably fix this problem by removing all
DoSa> '%' chars from my .Rd files, but this doesn't seem
DoSa> 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.
>>
DoSa> 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
>>
>>
DoSa> An example of the '% problem' is provided by the
DoSa> RcppExample.Rd file that is part of the RcppTemplate
DoSa> package (V4.2). There you will find:
DoSa> # Note that we need to escape the percent sign here...
DoSa> datestr <- c('2006-6-10', '2006-7-12', '2006-8-10')
DoSa> datevec <- as.Date(datestr, "\%Y-\%m-\%d") # date vector
which is perfect...
"Writing R Extensions" has always said you must escape them...
DoSa> Without the escaped '%' signs
you really get invalid examples, not just for example()
DoSa> I get an obscure error message when
DoSa> I run:
>> example(RcppExample)
DoSa> Here is the error message:
DoSa> Error in parse(file, n = -1, NULL, "?") : syntax error at
DoSa> 36:
DoSa> 37:
Now if I run 'R CMD check RcppTemplate' I see no problem.
In my eyes, everything is ok there.
So where exactly does CRAN (i.e. the CRAN machine that does the
daily checks) have a problem?
Maybe it's really a problem on that machine, than rather with
your *.Rd files ... :-)
Hmm, actually I now start wondering: Why did we ever start
talking about this at all? Isn't this something you have to settle
with Kurt, Fritz, or whomever.. ?
Regards,
Martin Maechler
Martin Maechler wrote:
Hmm, actually I now start wondering: Why did we ever start talking about this at all? Isn't this something you have to settle with Kurt, Fritz, or whomever.. ? Regards, Martin Maechler
Sorry if I was unclear, but yes, it was settled with the help of Kurt. As I said, the latest r-devel includes some new type checking (to be sure that STRING_ELT is applied where it makes sense, for example), and this is why CRAN was picking up problems that I was not seeing. I guess I missed that fact about the '%' character in the docs. ds
"Dominick" == Dominick Samperi <dsamperi at DecisionSynergy.com>
on Thu, 27 Jul 2006 08:51:34 -0400 writes:
Dominick> Martin Maechler wrote:
>> Hmm, actually I now start wondering: Why did we ever start
>> talking about this at all? Isn't this something you have to settle
>> with Kurt, Fritz, or whomever.. ?
>> Regards,
>> Martin Maechler
Dominick> Sorry if I was unclear, but yes, it was settled with the help of Kurt. As I
Dominick> said, the latest r-devel includes some new type checking (to be sure that
Dominick> STRING_ELT is applied where it makes sense, for example), and this
Dominick> is why CRAN was picking up problems that I was not seeing.
but not related to "%" ???
Also, with R-devel "as of last night"
I (i.e., "R-devel CMD check") don't see any problems in
RcppTemplate or its help files.
Dominick> I guess I missed that fact about the '%' character in the docs.
Martin Maechler wrote:
"Dominick" == Dominick Samperi <dsamperi at DecisionSynergy.com>
on Thu, 27 Jul 2006 08:51:34 -0400 writes:
Dominick> Martin Maechler wrote:
>> Hmm, actually I now start wondering: Why did we ever start
>> talking about this at all? Isn't this something you have to settle
>> with Kurt, Fritz, or whomever.. ?
>> Regards,
>> Martin Maechler
Dominick> Sorry if I was unclear, but yes, it was settled with the help of Kurt. As I
Dominick> said, the latest r-devel includes some new type checking (to be sure that
Dominick> STRING_ELT is applied where it makes sense, for example), and this
Dominick> is why CRAN was picking up problems that I was not seeing.
but not related to "%" ???
Also, with R-devel "as of last night"
I (i.e., "R-devel CMD check") don't see any problems in
RcppTemplate or its help files.
Dominick> I guess I missed that fact about the '%' character in the docs.
This is a somewhat old post, and I didn't mean to suggest that there are any remaining problems (the package wouldn't have been released otherwise). The trivial topic about '%' signs never would have come up if it wasn't mixed up with the other unrelated and non-trivial problem that is now resolved. Thanks for the feedback. ds