[R] Sweve/cacheSweave

Unger, Kristian k.unger at imperial.ac.uk
Thu Feb 11 14:39:30 CET 2010


Thank you very much Duncan! Adding the line \usepackage{Sweave} fixed the problem.

Best wishes

Kristian
_____ 

Dr Kristian Unger

Bioinformaticist Chernobyl Tissue Bank

Division of Surgery and Cancer

Imperial College London

Rm G02, Ground floor G Block
Hammersmith Hospital
Du Cane Road, 
London W12 0HS

Tel +44-20-8383-2443

Mob +44-795-1080619

Skype kristianunger

http://www1.imperial.ac.uk/medicine/about/divisions/is/histo/
http://www.chernobyltissuebank.com

-----Original Message-----
From: Duncan Murdoch [mailto:murdoch at stats.uwo.ca] 
Sent: 11 February 2010 12:06
To: Unger, Kristian
Cc: 'r-help at r-project.org'
Subject: Re: [R] Sweve/cacheSweave

On 11/02/2010 6:06 AM, Duncan Murdoch wrote:
> Unger, Kristian wrote:
>> Hi there
>>
>> I have a problem with using Sweave in combination with the option driver = cacheSweave.
>>
>> Whichever code I try to run  - when it comes to converting the tex file into pdf it comes up with the same errors (\csname \endcsname errors). Does anybody have an idea what it going wrong?
>>
>>   
>>> Sweave("pgfSweave-example.Rnw",driver  =  cacheSweaveDriver)
>>>     
>> Writing to file pgfSweave-example.tex
>> Processing code chunks ...
>>  1 : term verbatim (label=setup)
>>  2 : echo term verbatim (label=data)
>>  3 : term verbatim eps pdf (label=boxplot)
>>
>> You can now run LaTeX on 'pgfSweave-example.tex'
>>
>>   
>>> tools::texi2dvi("pgfSweave-example.tex", pdf=TRUE)
>>>     
>> Error in tools::texi2dvi("pgfSweave-example.tex", pdf = TRUE) :
>>   running 'texi2dvi' on 'pgfSweave-example.tex' failed
>>
>> LaTeX errors:
>> C:/Imperial/Sileida/DOUBLECHECK/ALL/eval_amps/pgfSweave-example.tex:10: Missing
>>  \endcsname inserted
>> The control sequence marked <to be read again> should
>> not appear between \csname and \endcsname.
>>
>> C:/Imperial/Sileida/DOUBLECHECK/ALL/eval_amps/pgfSweave-example.tex:10: LaTeX E
>> rror: Missing \begin{document}.
>>   
> 
> I think this is the important error:  it looks as though your .tex file 
> isn't a complete LaTeX document.  The other errors likely follow from this.

 From an offline followup:  the .tex was complete, but it included a 
path to Sweave.sty that contained TeX-special characters, and that was 
the source of the error.  See ?RweaveLatex for a discussion of how to 
avoid this.

Duncan Murdoch

> 
> Duncan Murdoch
>> See the LaTeX manual or LaTeX Companion for explanation.
>> Type  H <return>  for immediate help
>> C:/Imperial/Sileida/DOUBLECHECK/ALL/eval_amps/pgfSweave-example.tex:10: Extra \
>> endcsname
>> I'm ignoring this, since I wasn't doing a \csname.
>>
>>
>> C:/Imperial/Sileida/DOUBLECHECK/ALL/eval_amps/pgfSweave-example.tex:10: Missing
>>  \endcsname inserted
>> The control sequence marked <to be read again> should
>> not appear between \csname and \endcsname.
>>
>> C:/Imperial/Sileida/DOUBLECHECK/ALL/eval_amps/pgfSweave-example.tex:10: Extra \
>> endcsname
>> I'm ignoring this, since I wasn't doing a \csname.
>>
>> I am running this under Windows XP, R version 2.9.2 (2009-08-24), > package.version("cacheSweave")
>> [1] "0.4-3".
>>
>> Any help or advice on this would be highly appreciated!
>>
>> Best wishes
>>
>> Kristian
>>
>> _____
>>
>> Dr Kristian Unger
>>
>> Bioinformaticist Chernobyl Tissue Bank
>>
>> Division of Surgery and Cancer
>>
>> Imperial College London
>>
>> Rm G02, Ground floor G Block
>> Hammersmith Hospital
>> Du Cane Road,
>> London W12 0HS
>>
>> Tel +44-20-8383-2443
>>
>> Mob +44-795-1080619
>>
>> Skype kristianunger
>>
>> http://www1.imperial.ac.uk/medicine/about/divisions/is/histo/
>> http://www.chernobyltissuebank.com
>>
>>
>> 	[[alternative HTML version deleted]]
>>
>> ______________________________________________
>> 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.
>>
> 
> ______________________________________________
> 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