Skip to content

.Rd vs. .R, matrix multiplication

2 messages · Christian Schulz, Duncan Murdoch

#
Hi,

I find it cumbersomesome the I have to use \%*\% in .Rd files vs. %*% in 
.R files. R CMD check will refuse %*% in .Rd files. I would like to have 
%*% in .Rd files to be able to execute expressions with matrix 
multiplication from .Rd files directly, but ESS (version 5.13) would 
refuse to execute this execution.

What can be done here?

TIA

Christian
#
On 12-12-03 5:00 PM, Christian Hoffmann wrote:
That sounds like a problem that ESS could solve.  The rules for what 
needs escaping in .Rd files are well defined, and ESS should know what 
kind of file it is editing, so it should be fixable.

Allowing raw %*% in a .Rd code block would mean that invisible comments 
were impossible (since Rd comments start with %).  They are not 
extremely common, but common enough that it would inconvenience a lot of 
package writers to make that change.  Seems like a small ESS fix is easier.

Duncan Murdoch