[R] Problem: Sweave and math environments
Sarah Goslee
sarah.goslee at gmail.com
Tue Nov 4 15:15:34 CET 2008
I'm sure there are a variety of ways around this. My chosen solution
is to replace
mydata$somevar
with
mydata[, "somevar"]
Sarah
On Tue, Nov 4, 2008 at 6:16 AM, Christian Reisinger
<creisinger at gsss.uni-bremen.de> wrote:
> Dear list,
...
> I want Sweave to "echo" my code, so that the R source code of the code
> chunks appears in the Latex document. However, since I am using several $
> signs per line, as in the example line below, Latex interprets this as a
> math environment, despite the fact that the $ signs are within the {Sinput}
> environment. The problem now is that I sometimes have an unequal number of $
> signs in an input line, so that LaTex thinks that all of the following
> "normal" text is still part of the math environment, and formats it
> accordingly.
>
--
Sarah Goslee
http://www.functionaldiversity.org
More information about the R-help
mailing list