Hi All,

I'm a new user trying to figure out a good pipeline for R/Latek/Sweave.  Works great for me, except it crashes TextMate after rendering the PDF!  

Lots of information below and attached.  It seems like a TextMate problem (and I've sent off a bug report) but thought someone here might have some insight.  

Any thoughts?

Thanks!Alex

PS: I noticed a spam ad for payday loans on the wiki, so I deleted it.  If any of you guys need payday loans, I apologize!


Reproduce:
- Install TextMate,R,Latek,R/Latek/Sweave bundles
- Use TextMate to render Example.Rnw (below).
- TextMate does an admirable job, producing the correct PDF.
- After this, the PDF window shows a spinning cursor in the top-right, and crashes after ~10s.

Both TextMate and the PDF window respond normally during this time.  Crash occurs even if I close the PDF window!

Attached for diagnostics:
Crash log: 
Crash Report.txt
Sample of TextMate process from just before executing Example.Rnw until after the crash: 
Exited process_6469.FdDN5T.sample
Console Errors
11/19/10 2:24:40 PM defaults[6774] The domain/default pair of (com.macromates.textmate.webpreview, SelectedTheme) does not exist
11/19/10 2:25:09 PM com.apple.launchd.peruser.1987805519[4483] ([0x0-0x94094].com.macromates.textmate[6629]) Job appears to have crashed: Segmentation fault

Example .Rnw file from the Sweave manual
from: http://cran.r-project.org/web/packages/pgfSweave/vignettes/pgfSweave.pdf
\documentclass[a4paper]{article}
\title{Sweave Example 1} 
\author{Friedrich Leisch}
\begin{document} 
\maketitle
In this example we embed parts of the examples from the \texttt{kruskal.test} help page into a \LaTeX{} document:
<<>>= 
data(airquality) 
kruskal.test(Ozone ~ Month, data = airquality) 
which shows that the location parameter of the Ozone distribution varies significantly from month to month. Finally we include a boxplot of the data:
\begin{center} 
<<fig=TRUE ,echo=FALSE >>= 
boxplot(Ozone ~ Month, data = airquality) 
\end{center}
\end{document}
>> note: delete library(ctest) from the original example to run.


My installation (all of this as of 10.11.19)
- Installed: "R version 2.12.0 (2010-10-15)"
- MacTex basic from http://mirror.unl.edu/ctan/systems/mac/mactex/mactex-basic.pkg.zip
- TexMate from : http://download.macromates.com/TextMate_1.5.10.zip
- Installed R,Latex,and Sweave bundles as per: http://www.r-bloggers.com/setting-up-textmate-to-use-r/, ie.,
mkdir -p /Library/Application\ Support/TextMate/Bundles
cd /Library/Application\ Support/TextMate/Bundles
svn co http://svn.textmate.org/trunk/Bundles/R.tmbundle
svn co http://svn.textmate.org/trunk/Bundles/Latex.tmbundle
svn co http://svn.textmate.org/trunk/Bundles/SWeave.tmbundle
- Got around the Sweave.sty problem by
mkdir -p ~/Library/texmf/tex/latex 
cd ~/Library/texmf/tex/latex 
ln -s /Library/Frameworks/R.framework/Resources/share/texmf Sweave
... as per somewhere.





---
Alex Vaughan
HHMI, Janelia Farm Research Center
Dept. of Biology, Stanford University
Email :: avaughan@stanford.edu
Phone :: 510 717 6010
---