# [Rd] typesetting a matrix in an Rd file

From: Robin Hankin <r.hankin_at_noc.soton.ac.uk>
Date: Thu 21 Sep 2006 - 09:05:42 GMT

Hello everybody

I'm trying to write an Rd file so that the resulting LaTeX-ed document includes a matrix.

Here is the line in question:

\deqn{

E_\theta\left(
\begin{array}{cc}

       1 & x\theta\\
x\theta & x^2\theta^2
\end{array}\right)
}{ommitted: see dvi}



which looks OK to me; the contents of the first curly brace produce the desired matrix in a regular .tex file.

But it doesn't produce the desired matrix when included in an Rd file: on my system the ampersands show up literally, and the whole equation is on one line. I suspect that the backslashes and ampersands are being escaped somehow, and TeX isn't interpreting them as desired.

How do I write an Rd file so that the output of R CMD Rd2dvi includes a nicely typeset matrix?

--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel  023-8059-7743

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Received on Thu Sep 21 19:08:30 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 21 Sep 2006 - 13:30:08 GMT.

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