[R] including r code in a latex file

Ko-Kang Wang Ko-Kang at xtra.co.nz
Tue May 2 00:16:51 CEST 2000


One way, I don't know about the efficiency though, that I use is:
\begin{display}
\begin{verbatim}
blah blah blah and more R code blah...
\end{display}
\end{verbatim}


Faheem Mitha wrote:

> Dear R people,
>
> The header practically says it all. I was wanting to include r code in a
> Latex file. Since R code using{ and }, which are interpreted by Latex as
> control characters, I would expect it to get upset.
>
> I believe that \{ would probably print as {, but I hoping I don't have to
> go through the code and add lots of \. I would rather use some global
> commannd, along the lines of \treatastext{R code}.
>
> Is there something like this? I'm not that familiar with Latex.
>
>                                   Thanks, Faheem.
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list