Including Images in R-Package Documentation Files (. Rd)

I am working on documenting the visualization function in my package. To do this, I would like to have an image embedded in the Rd file 'funcname.Rd', which could explain the various parameters used in this function, and which will appear if the user reads the manual for a batch PDF file or writes'? Funcname 'in R. Something in the lines:

Manual example

"Writing R-extension docs doesn't seem to address this issue, and the only links I could find were this blog post and this R-devel discussion . The former has a broken link to a package called base64, and the latter only refers to various alternatives, such as including images in vignettes of R packets, it would be great if it were compatible with CRAN.

Any advice on how to approach this problem would be appreciated, thanks!

+7
r package documentation visualization rd
source share
1 answer

Unconfirmed, but look at the R source on GitHub, it looks like they will add an image to the ?par documentation file as follows

  \item{\code{mai}}{A numerical vector of the form \code{c(bottom, left, top, right)} which gives the margin size specified in inches.\cr \if{html}{\figure{mai.png}{options: width="35\%" alt="Figure: mai.png"}} \if{latex}{\figure{mai.pdf}{options: width=7cm}} } 

The metric is stored in /man/figures .

+10
source share

All Articles