[Roxygen-devel] Allow % in @example files
Manuel J. A. Eugster
Manuel.Eugster at stat.uni-muenchen.de
Thu Sep 16 07:39:11 CEST 2010
Hi Daniel,
thank you for the patches; I'll check them and integrate it
into the package in near future!
Best,
Manuel.
On 9/14/10 10:08 AM, Daniel Sabanés Bové wrote:
> Sorry, I forgot the attachments... now in this email.
>
>
> -------- Original-Nachricht --------
> Betreff: Allow %' in @example files
> Von: Daniel Sabanés Bové<daniel.sabanesbove at ifspm.uzh.ch>
> An: roxygen-devel at lists.r-forge.r-project.org
> Datum: Mon 13 Sep 2010 15:50:04 CET
>
>> Hi,
>>
>> I like the @example roclet very much because it allows for clean
>> separation of function documentation and example code. However, today I
>> experienced that the percent symbol (%) is interpreted as a comment
>> character. (This is at least the case in R 2.11.1, which I am using, and
>> presumably since R 2.9.0, as described in a documentation by Duncan
>> Murdoch [1].) So we get in trouble when the example.R file contains
>> matrix multiplication "a %*% b", because R CMD check will just see "a",
>> the rest of the line being a comment.
>>
>> Fortunately it is easy to get roxygen to replace all % symbols in the
>> @example files with "\%", so that the resulting Rd file is correct: I
>> have attached the two necessary patches to Rd.R and Rd2.R, based on the
>> release version 0.1-2.
>>
>> Hope this is useful,
>>
>> best regards
>> Daniel
>>
>> [1] http://developer.r-project.org/parseRd.pdf
>>
>>
>> _______________________________________________
>> Roxygen-devel mailing list
>> Roxygen-devel at lists.r-forge.r-project.org
>> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/roxygen-devel
More information about the Roxygen-devel
mailing list