[R] Can mathematical formula be used in the help file of a R function or package?

Rolf Turner rolf.turner at xtra.co.nz
Mon Jun 20 23:38:27 CEST 2011


On 21/06/11 06:52, Runlong Tang wrote:
> Hi everyone,
>
>
>
> I am writing help files for some R functions in an R package. I am wondering
> if we can use the Latex mathematical formula when editing those *.Rd files
> and then obtain a pdf manual with beautiful mathematical formula. I tried it
> with the default R CMD check command but could not get the desired
> mathematical formula. That is, $f(x)$ is not recognized as a math formulas.
> I think the R CMD check command invokes pdfLatex. Is it possible to do some
> setting to make the R CMD check command recognize $f(x)$ as a math formulas?

See Writing R Extensions --> Writing R Documentation Files --> Mathematics

You need eqn{} and/or deqn{}.

     cheers,

         Rolf Turner



More information about the R-help mailing list