[OS X TeX] R statistics package

Charilaos Skiadas skiadas at hanover.edu
Fri Feb 23 16:42:52 EST 2007


On Feb 23, 2007, at 4:21 PM, Salvatore Enrico Indiogine wrote:

> Thanks Haris, that was it!
>
> I suppose that if I create the Sweave file initially with tex
> extension, then TeXShop will color code it.  Then at the end I can
> just rename it to <filename>.rnw and run it through Sweave.

Yes it will, though it will not color code the R code parts, since  
TeXShop is an editor for LaTeX files, not a general text editor, and  
knows nothing about sweave and R. For that, if you want a free  
editor, you would have to go with emacs or vi I guess, though I don't  
know if they have a Sweave mode or something. ( I suppose ESS must  
have something for Sweave).

But if you want to just color the LaTeX part, then that would  
probably do it. Though when you want to reedit the file and try to  
rename it to have extension .tex, you'll have to delete the already  
created tex file or something.

You can actually change the Sweave command to have it save the file  
with a different name, and then you can just keep all your Sweave  
files as .tex files, but that just feels wrong. But if you really  
want to persist with this approach, have a look at the corresponding  
documentation in R:

?Sweave
?RweaveLatex

> Enrico

Haris Skiadas
Department of Mathematics and Computer Science
Hanover College





------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the MacOSX-TeX mailing list