hello, Suppose in Rnw file, I compute a numeric of name x containing the value 1. In my tex file, I want to write Let x= "the real value of x" so that I can see in my dvi file : Let x = 1, with 1, the actual value of x written in a math environnement for example. Thanks, Matthieu
I believe you want \Sexpr{} for instance: let $x = \Sexpr{x}$ or if you need rounding let $x = \Sexpr{round(x, dig=4)}$ On Fri, 18 Feb 2005, Matthieu Cornec wrote:> hello, > > Suppose in Rnw file, I compute a numeric of name x containing the value 1. > In my tex file, I want to write > > Let x= "the real value of x" > so that I can see in my dvi file : Let x = 1, > with 1, the actual value of x written in a math environnement for example. > > Thanks, > > Matthieu > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! R-project.org/posting-guide.html > >Paulo Justiniano Ribeiro Jr LEG (Laborat?rio de Estat?stica e Geoinforma??o) Departamento de Estat?stica Universidade Federal do Paran? Caixa Postal 19.081 CEP 81.531-990 Curitiba, PR - Brasil Tel: (+55) 41 361 3573 Fax: (+55) 41 361 3141 e-mail: paulojus at est.ufpr.br est.ufpr.br/~paulojus
> De : r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch]De la part de > Matthieu Cornec > Envoye : vendredi 18 fevrier 2005 17:40 > > hello, > > Suppose in Rnw file, I compute a numeric of name x > containing the value 1. > In my tex file, I want to write > > Let x= "the real value of x" > so that I can see in my dvi file : Let x = 1, > with 1, the actual value of x written in a math > environnement for example.Try the \Sexpr{} command in LaTeX (see the Sweave manual). It's OK for a scalar. For example, something like this in the body of your LaTeX file should do what you want: <<>>x<-1 @ Let $x=\Sexpr{x}$ Christophe