Hi! On 13-Aug-02 Daniel Hoppe wrote:> Hi, > > I'm actually afraid that this is a RTFM question - I read the manual but > didn't find anything yet... I'm looking for a way to document R sourcecode > in my thesis. Does anyone know of a tool or function which can convert or > export R sourcecode to Tex?There are several ways. One is to simply use fancyverbatim to include the sourcecode into the TeX-file, or a bit more sophisticated you may use the listings to do the same since there is a definition for R included in the distribution, though I must apologise for not updating it in quite a long time... Listings prints functions in a different font than variables and comments as well. Furthermore it has many interesting features for displaying sourcecode. So long, Winfried --------------------------------------------------------------------- E-Mail: Winfried Theis <theis at statistik.uni-dortmund.de> Date: 13-Aug-02 Dipl.-Math. Winfried Theis SFB 475, Fachbereich Statistik, Universit"at Dortmund, 44221 Dortmund Tel.: +49-231-755-5903 FAX: +49-231-755-4387 ---------------------------------------------------------------------- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hi, I'm actually afraid that this is a RTFM question - I read the manual but didn't find anything yet... I'm looking for a way to document R sourcecode in my thesis. Does anyone know of a tool or function which can convert or export R sourcecode to Tex? Thanks for any hints! Best Regards, Daniel <<<<<<<<<<<<<<<<<<<<<<<<<<< sitewaerts GmbH Hebelstra?e 15 D-76133 Karlsruhe Tel: +49 (721) 920 918 0 Fax: +49 (721) 920 918 29 http://www.sitewaerts.de>>>>>>>>>>>>>>>>>>>>>>>>>>>Der Inhalt dieser E-Mail ist vertraulich und ausschlie?lich f?r den bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein sollten, so beachten Sie bitte, da? jede Form der Kenntnisnahme, Ver?ffentlichung, Vervielf?ltigung oder Weitergabe des Inhalts dieser E-Mail unzul?ssig ist. Wir bitten Sie, sich in diesem Fall mit dem Absender der E-Mail in Verbindung zu setzen. Aussagen gegen?ber dem Adressaten unterliegen den Regelungen des zugrundeliegenden Angebotes bzw. Auftrags, insbesondere den Allgemeinen Auftragsbedingungen und der individuellen Haftungsvereinbarung. Der Inhalt der E-Mail ist nur rechtsverbindlich, wenn er unsererseits durch einen Brief entsprechend best?tigt wird. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
People who write S/R books and manuals normally use a verbatim environment, either \begin{verbatim} or some variation thereon. Take a look at Rd.sty to see how the reference manual is done (it uses verbatim). On Tue, 13 Aug 2002, Daniel Hoppe wrote:> Hi, > > I'm actually afraid that this is a RTFM question - I read the manual but > didn't find anything yet... I'm looking for a way to document R sourcecode > in my thesis. Does anyone know of a tool or function which can convert or > export R sourcecode to Tex? > > Thanks for any hints! > > Best Regards, > > Daniel > > <<<<<<<<<<<<<<<<<<<<<<<<<<< > sitewaerts GmbH > Hebelstraße 15 > D-76133 Karlsruhe > > Tel: +49 (721) 920 918 0 > Fax: +49 (721) 920 918 29 > http://www.sitewaerts.de > >>>>>>>>>>>>>>>>>>>>>>>>>>> > > > Der Inhalt dieser E-Mail ist vertraulich und ausschließlich für den > bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat > dieser E-Mail oder dessen Vertreter sein sollten, so beachten Sie bitte, daß > jede Form der Kenntnisnahme, Veröffentlichung, Vervielfältigung oder > Weitergabe des Inhalts dieser E-Mail unzulässig ist. Wir bitten Sie, sich in > diesem Fall mit dem Absender der E-Mail in Verbindung zu setzen. Aussagen > gegenüber dem Adressaten unterliegen den Regelungen des zugrundeliegenden > Angebotes bzw. Auftrags, insbesondere den Allgemeinen Auftragsbedingungen > und der individuellen Haftungsvereinbarung. Der Inhalt der E-Mail ist nur > rechtsverbindlich, wenn er unsererseits durch einen Brief entsprechend > bestätigt wird. > > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> -----Original Message----- > From: Daniel Hoppe [mailto:hoppe at sitewaerts.de] > Hi, > > I'm actually afraid that this is a RTFM question - I read the > manual but > didn't find anything yet... I'm looking for a way to document > R sourcecode > in my thesis. Does anyone know of a tool or function which > can convert or > export R sourcecode to Tex? > > Thanks for any hints! > > Best Regards, > > DanielCheck out the listings tex package, available from ctan.tug.org. It is designed to format source code (of any variety), including line numbers, etc, if desired. hth, Eric -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> I'm actually afraid that this is a RTFM question - I read the manual but > didn't find anything yet... I'm looking for a way to document R sourcecode > in my thesis. Does anyone know of a tool or function which can convert or > export R sourcecode to Tex?GNU a2ps, an "anything to postscript" converter, can typeset and pretty-print some 40+ languages, R and S included. thanks to a file Kurt, Torsten and I contributed to a2ps. At least Debian's a2ps includes this 'style sheet' file, others can fetch it from CRAN. It is of course meant directly for a printer (or viewer as gv) -- but some true postscript wizard might know a trick to 'extract' the pretty-printed code? Dirk -- According to the latest figures, 43% of all signatures are totally worthless. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hi Daniel, You may also find Sweave in the 'tools' package helpful if you go beyond listing code and want to include results. I have found Sweave exceedingly effective for developing code verification and validation documents. BTW, it is also very easy to use. Best regards, Michael Grant --- Daniel Hoppe <hoppe at sitewaerts.de> wrote:> Hi, > > I'm actually afraid that this is a RTFM question - I > read the manual but > didn't find anything yet... I'm looking for a way to > document R sourcecode > in my thesis. Does anyone know of a tool or function > which can convert or > export R sourcecode to Tex? > > Thanks for any hints! > > Best Regards, > > Daniel > > <<<<<<<<<<<<<<<<<<<<<<<<<<< > sitewaerts GmbH > Hebelstraße 15 > D-76133 Karlsruhe > > Tel: +49 (721) 920 918 0 > Fax: +49 (721) 920 918 29 > http://www.sitewaerts.de > >>>>>>>>>>>>>>>>>>>>>>>>>>> > > > Der Inhalt dieser E-Mail ist vertraulich und > ausschließlich für den > bezeichneten Adressaten bestimmt. Wenn Sie nicht der > vorgesehene Adressat > dieser E-Mail oder dessen Vertreter sein sollten, so > beachten Sie bitte, daß > jede Form der Kenntnisnahme, Veröffentlichung, > Vervielfältigung oder > Weitergabe des Inhalts dieser E-Mail unzulässig ist. > Wir bitten Sie, sich in > diesem Fall mit dem Absender der E-Mail in > Verbindung zu setzen. Aussagen > gegenüber dem Adressaten unterliegen den Regelungen > des zugrundeliegenden > Angebotes bzw. Auftrags, insbesondere den > Allgemeinen Auftragsbedingungen > und der individuellen Haftungsvereinbarung. Der > Inhalt der E-Mail ist nur > rechtsverbindlich, wenn er unsererseits durch einen > Brief entsprechend > bestätigt wird. > > >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-> r-help mailing list -- Read > http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: > r-help-request at stat.math.ethz.ch >_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ __________________________________________________ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
A beginners question: What the analogon in R of the ginverse() function in Splus? Thank you. Best Regards, Enric -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Dear Enrico, ginv in the Package MASS calculates the Moore-Penrose generalized inverse, and should be the analogous of ginverse in Splus ------- julien Claude ISEM, Universit? de Montpellier 2 34095 Montpellier France A 16:17 14/08/02 +0200, Enrico De Giorgi a ?crit :>A beginners question: > >What the analogon in R of the ginverse() function in Splus? > >Thank you. > >Best Regards, >Enric >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.->r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html >Send "info", "help", or "[un]subscribe" >(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch >_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._> >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hi all, thanks for all the great help. Just in case someone is interested: I ended up using the tex package "listings" and Sweave, both really convenient to use. Best Regards, Daniel <<<<<<<<<<<<<<<<<<<<<<<<<<< sitewaerts GmbH Hebelstra?e 15 D-76133 Karlsruhe Tel: +49 (721) 920 918 0 Fax: +49 (721) 920 918 29 http://www.sitewaerts.de>>>>>>>>>>>>>>>>>>>>>>>>>>>Der Inhalt dieser E-Mail ist vertraulich und ausschlie?lich f?r den bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein sollten, so beachten Sie bitte, da? jede Form der Kenntnisnahme, Ver?ffentlichung, Vervielf?ltigung oder Weitergabe des Inhalts dieser E-Mail unzul?ssig ist. Wir bitten Sie, sich in diesem Fall mit dem Absender der E-Mail in Verbindung zu setzen. Aussagen gegen?ber dem Adressaten unterliegen den Regelungen des zugrundeliegenden Angebotes bzw. Auftrags, insbesondere den Allgemeinen Auftragsbedingungen und der individuellen Haftungsvereinbarung. Der Inhalt der E-Mail ist nur rechtsverbindlich, wenn er unsererseits durch einen Brief entsprechend best?tigt wird. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._