[R] Can't install Sweave

Duncan Murdoch murdoch.duncan at gmail.com
Sat Dec 11 18:38:27 CET 2010


On 11/12/2010 11:18 AM, Rainer Schuermann wrote:
> On Saturday 11 December 2010 14:54:39 Duncan Murdoch wrote:
>> If you put a copy of Sweave.sty into your latex installation, in a few
>> months you'll have an obsolete version, and things will just not work.
>
> A link from ly latex installation to the original file in my R installation would do fine? It works, but is there a downside I wouldn't know?

The link may break when you re-install R, but the link is probably safer 
than making a copy.

> Background is that I want to use kile for editing my .Rnw file (which will be more text than calculation), with the convenience of having the .Rnw and the .tex file (and the .bib file) all in one window, with an integrated Konsole window at the bottom.

I don't know that editor, but I would suggest that most of the time you 
don't really want to look at the .tex file.  Changes there get wiped out 
the next time you run Sweave.

What I do is to write a simple command for my editor that does the three 
steps Sweave, latex/pdflatex, preview all in one command.  I wrote a 
little R package that helps with this; it's called patchDVI, available 
on R-forge.  Using that package the command is

echo patchDVI::SweaveMiktex('%2', preview='yap -1 -s"%1%2" \x25s') | 
Rterm --slave

or

echo patchDVI::SweavePDF('%2', stylepath=FALSE, 
preview="f:/SumatraPDF/SumatraPDF \x25s") | Rterm --slave


The previewer gets links back to the .Rnw file.

This still requires looking at the .tex file to understand LaTeX errors; 
one day I'll patch those too, but haven't got around to it yet.

Duncan Murdoch


>
> Thanks,
> Rainer
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list