Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

matmult sign in R-help file of package?

Tags:

r

I'm trying to write the help file of an R package and everything after '%*%' in

a1%*%M

gets ignored. Anybody knows how to remediate?

like image 539
user189035 Avatar asked Nov 19 '25 17:11

user189035


1 Answers

From Parsing Rd Files

An unescaped percent symbol % marks the beginning of an Rd comment, which runs to the end of the current line. The parser returns these marked as COMMENT tokens.

Your examples section needs to escape those % symbols. Something like this:

\examples{
letters[1:10] \%in\% letters[1:3]
}
like image 194
GSee Avatar answered Nov 21 '25 08:11

GSee