[Rd] Non-vignette sweave file in package
murdoch.duncan at gmail.com
Thu Apr 4 19:04:04 CEST 2013
On 04/04/2013 10:55 AM, ONKELINX, Thierry wrote:
> Dear all,
> I'm documenting an elaborate analysis as a private package. The package writes all required output to a database. I use a Sweave file to transform all the results from the database into a report.
> Now I would like to add this Sweave to my package. I'm a bit puzzled on how to do that. It is not a vignette: the data is not available when the package is build and I need to recompile the Sweave file on demand (after the analysis was run).
> So I have two questions.
> 1) Where to put a non-vignette Sweave file in a package.
> 2) How do I compile that Sweave file.
1) You can put it anywhere you like in the inst directory, but "doc"
might make sense (if it doesn't trigger warnings about a badly formed
vignette, I haven't checked). When installed, it moves up one level.
will be retrievable as system.file("doc/mydoc.Rnw", package="mypkg").
2) Use Sweave() and tools::texi2pdf(). You might want to write your own
function that calls those, after saving the data in the appropriate place.
> Best regards,
> ir. Thierry Onkelinx
> Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest
> team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
> Kliniekstraat 25
> 1070 Anderlecht
> + 32 2 525 02 51
> + 32 54 43 61 85
> Thierry.Onkelinx at inbo.be
> To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of.
> ~ Sir Ronald Aylmer Fisher
> The plural of anecdote is not data.
> ~ Roger Brinner
> The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data.
> ~ John Tukey
> * * * * * * * * * * * * * D I S C L A I M E R * * * * * * * * * * * * *
> Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is door een geldig ondertekend document.
> The views expressed in this message and any annex are purely those of the writer and may not be regarded as stating an official position of INBO, as long as the message is not confirmed by a duly signed document.
> R-devel at r-project.org mailing list
More information about the R-devel