Skip to content
Prev 1123 / 12125 Next

[R-pkg-devel] Understanding notes from win-builder

On 03/10/2016 3:04 PM, Roy Mendelssohn - NOAA Federal wrote:
A possibility would be to include a small number of sample pages with 
your package, and offer a way to view them in a browser, or run your 
functions on them.  The system.file() function will give the installed 
location of those files.

For example, if you put sample.html in your package in directory 
inst/SamplePages, it will be installed into 
<pkg>/SamplePages/sample.html in your library, and can be browsed using

   browseURL(system.file("SamplePages/sample.html", package = "<pkg>"))

(with appropriate substitutions for <pkg>, of course).  You probably 
don't want to call browseURL() in a test, but you can
use

if (interactive()) browseURL( ... )

Duncan Murdoch