[Rd] How to document man/*.Rd pages with images?

Duncan Murdoch murdoch.duncan at gmail.com
Wed May 11 23:11:09 CEST 2011


On 11/05/2011 4:45 PM, Sean Robert McGuffee wrote:
>
>
>
> On 5/11/11 4:20 PM, "Paul Gilbert"<pgilbert at bank-banque-canada.ca>  wrote:
>
>> I thought the usual logic was that you might put graphs and images into a
>> vignette, and you might refer to the vignette in an Rd help file, but you
>> would not put the graphs into the help because ? access to the page cannot
>> assume that you actual have a graphics device. Of course, examples in the Rd
>> file can generate the graphs.
>>
>> Paul
>
>
> My understanding was that one can require graphics for a package that does
> require graphics, right?

No, there's no simple way to require particular hardware, or particular 
user options (e.g. options(help_type="text") would mean no HTML).  The 
startup code for a package might be able to check for the hardware and 
abort if it is unavailable, but a user could change help type at any time.

Duncan Murdoch

>
>>
>>> -----Original Message-----
>>> From: r-devel-bounces at r-project.org [mailto:r-devel-bounces at r-
>>> project.org] On Behalf Of Sean Robert McGuffee
>>> Sent: May 11, 2011 3:08 PM
>>> To: r-devel at r-project.org
>>> Subject: [Rd] How to document man/*.Rd pages with images?
>>>
>>> Hi,
>>> I¹m trying to figure out how to put images into my package¹s help
>>> documentation. I¹ve gotten to the point where I can put the images in
>>> the
>>> /inst/doc/ directory. I have also gotten to the point where I have
>>> package
>>> checks without any warnings. I couldn¹t find the terms ³picture,²
>>> ³image,²
>>> or ³graphic² in a text search within the Writing R Extensions: 2
>>> Writing R
>>> documentation files
>>> <http://cran.r-project.org/doc/manuals/R-exts.html#Writing-R-
>>> documentation-f
>>> iles>
>>> I tried a couple of LaTeX guesses, but they lead to the following
>>> errors on
>>> check:
>>> Warning: /LAB/SRM/PROGS/R_PACKAGES/Ralign/man/Ralign139.Rd:3:
>>> unexpected
>>> UNKNOWN '\usepackage'
>>> Warning: /LAB/SRM/PROGS/R_PACKAGES/Ralign/man/Ralign139.Rd:36: unknown
>>> macro
>>> '\includegraphics'
>>> What is the right way to do this?
>>> Thanks,
>>> Sean
>>>
>>>
>>> ______________________________________________
>>> R-devel at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>> ==============================================================================
>> ======
>>
>> La version française suit le texte anglais.
>>
>> ------------------------------------------------------------------------------
>> ------
>>
>> This email may contain privileged and/or confidential in...{{dropped:26}}
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list