Re: [R] Problem: Sweave and math environments

From: Duncan Murdoch <>
Date: Tue, 04 Nov 2008 09:33:17 -0500

On 11/4/2008 9:15 AM, Sarah Goslee wrote:
> I'm sure there are a variety of ways around this. My chosen solution
> is to replace
> mydata$somevar
> with
> mydata[, "somevar"]
> Sarah

You should almost never need to modify valid R code to work with Sweave.

   (There are a few exceptions: code that illustrates errors, or code that requires interaction with a user, etc.)

There's nothing wrong with including mydata$somevar in an Sweave code chunk.

Duncan Murdoch mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue 04 Nov 2008 - 14:37:02 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 04 Nov 2008 - 22:30:22 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive