I have solved the problem. It seems that the \Sexpr{} sequence is processed
by R rather than latex. If you use:
Sweave("Sweave-test-1.Rnw", syntax="SweaveSyntaxNoweb")
When processing in R then this is handled in the appropriate way.
Duncan Murdoch-2 wrote:> 
> On 1/6/2009 6:44 AM, Mr Derik wrote:
>> Hello
>> 
>> I have been setting up my computer to run Sweave. I have got the whole
>> thing
>> working on example files, except that my MikTex returns an
"Undefined
>> Control Sequence" error for \Sexpr and my output file contains
verbatim
>> code
>> sequences at the apropriate point in the text rather than the R output.
>> The
>> rest of the output file is fine with tables, R code sequences and
figures
>> in
>> the right place and correctly formatted. I have searched everywhere for
>> advice on what to do about this, any ideas would be gratefully
received.
>> 
> 
> You need to give more details.  Which version of R are you running?  How 
> are you running Sweave?  Are you including \usepackage{Sweave} in your 
> Sweave document?  (This is not always necessary, but is usually a good 
> idea).
> 
> Duncan Murdoch
> 
> ______________________________________________
> 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.
> 
> 
-- 
View this message in context:
http://www.nabble.com/Sweave-in-LATEX-tp21308911p21326922.html
Sent from the R help mailing list archive at Nabble.com.