[Rd] Viewing pdfs from inst/doc

rudjer rkoenker at uiuc.edu
Fri Sep 4 23:44:44 CEST 2009


Writing R extensions says:  

In addition to the help files in Rd format, R packages allow the inclusion
of documents in arbitrary other formats. The standard location for these is
subdirectory inst/doc of a source package, the contents will be copied to
subdirectory doc when the package is installed. Pointers from package help
indices to the installed documents are automatically created. Documents in
inst/doc can be in arbitrary format, however we strongly recommend to
provide them in PDF format, such that users on all platforms can easily read
them.

My question is easily How?  The function vignette() provides a convenient
way to read properly Sweaved 
vignettes, but what about plain old pdfs that someone like me would like to
stick into inst/doc and
then view?  It seems possible to make a modified vignette function to do
this using print.vignette,
but having started down this road, I got the strong sensation of reinventing
the wheel and the
inevitably related sensation that I wasn't going to know what to call my new
wheel when it was
created.  I recognize that the current setup is supposed to encourage proper
vignettes, but sometimes
courage fails.

A related questions is whether there is a convenient substitute for a
package specific function like this:
    FAQ <- function (pkg = "quantreg") 
          file.show(file.path(system.file(package = pkg), "FAQ"))

to read the faq that I've written for the package and placed in the inst/
directory.

-- 
View this message in context: http://www.nabble.com/Viewing-pdfs-from-inst-doc-tp25302477p25302477.html
Sent from the R devel mailing list archive at Nabble.com.



More information about the R-devel mailing list