[OS X TeX] R statistics package

Richard Koch koch at math.uoregon.edu
Sat Feb 24 18:52:49 CET 2007


Folks,

On Feb 23, 2007, at 12:02 PM, Salvatore Enrico Indiogine wrote:


> Thanks to all who have helped me get started with Sweave!   I did my
> first homework with LaTeX + Sweave + R today.   It is a terrific way
> to produce papers.
>
> Just a couple of things are bothering me.
>
> 1. TeXShop does not code color the Rnw file.
>

TeXShop understands Rnw files. Be sure to use 2.10beta8, since the  
list of editable file types was truncated in earlier beta versions.  
The extension needs to be "Rnw" rather than "rnw". If you create such  
a file in TeXShop (rather than just opening one), use the pulldown  
menu at the bottom of the save panel to pick the correct extension  
when saving.

The following short engine file will call Sweave and thus typeset in  
one step. Recall that the execution bit must be set when this engine  
is added to ~/Library/TeXShop/Engines. I recommend directly copying  
the fourth line, with its complicated mixture of single and double  
quotes.

Dick
koch at math.uoregon.edu

------------------------------
#!/bin/tcsh

set filename = "$1"
set texfilename = "${filename:r}.tex"


echo 'Sweave("'"$1"'")' | R --vanilla --quiet
pdflatex "$texfilename"
-------------------------------

------------------------- 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 macostex-archives mailing list