[R] How to include the documentation of a function in a Sweave document?

From: Jean lobry <lobry_at_biomserv.univ-lyon1.fr>
Date: Mon, 25 Feb 2008 18:16:02 +0100

Dear R-help,

I would like to include the documentation of an R function in an *.rnw document processed by Sweave. Because I'm sharing my *.rnw files with colleagues under Linux and Windows (I'm on Mac OS X), I would like a pure R solution.

The naive approach doesn't work, because Sweaving this *.rnw file:

yields the following LaTeX file on my platform (session info at the end):

in which no Soutput has been generated. Is it possible to redirect the help output, in a platform-independent way, so that it is included in the Soutput environment of the LaTeX file?



> sessionInfo()
R version 2.6.2 (2008-02-08)


attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached): [1] rcompgen_0.1-17

Jean R. Lobry            (lobry_at_biomserv.univ-lyon1.fr)
Laboratoire BBE-CNRS-UMR-5558, Univ. C. Bernard - LYON I,
43 Bd 11/11/1918, F-69622 VILLEURBANNE CEDEX, FRANCE
allo  : +33 472 43 27 56     fax    : +33 472 43 13 88

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Mon 25 Feb 2008 - 17:20:54 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 26 Feb 2008 - 14:30:16 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive