[Rd] Small nit in Sweave

Marc Schwartz marc_schwartz at me.com
Tue Nov 15 20:30:59 CET 2011

On Nov 15, 2011, at 1:10 PM, Terry Therneau wrote:

> Two small Sweave issues.
> 1. I had the following line in my code
>   <<echo=FALSE, results="hide">>
> resulting in the message
> Error in match.arg(options$results, c("verbatim", "tex", "hide")) : 
>  'arg' should be one of “verbatim”, “tex”, “hide”
>  I puzzled on this a bit since my argument exactly matched the message,
> until I thought of trying it without the quotes.
> 2. Where should I have reported this?  Sweave is not on CRAN so I
> couldn't find the maintainer email there.  Perhaps I'm missing something
> obvious though....
> Terry T.

Interesting. I never thought of using the 'results' options as quoted character vectors, even though in ?RweaveLatex, the description for the 'results' options indicates:

character string ("verbatim"). If "verbatim", the output of R commands is included in the verbatim-like Soutput environment. If "tex", the output is taken to be already proper LaTeX markup and included as is. If "hide" then all output is completely suppressed (but the code executed during the weave).

I can see how that could be confusing. All examples of the chunk headers I have seen do not use quoted values. Perhaps the above should state "Non-quoted character values" or similar verbiage.

In terms of reporting Terry, Sweave is in the 'utils' package, which is part of "Base R", therefore under the copyright of The R Foundation. So here is fine.


Marc Schwartz

More information about the R-devel mailing list