On Mon, Sep 12, 2011 at 9:21 AM, Twaha Mlwilo <uddessy2...@hotmail.com> wrote:
>
> Hello all,
> Good day,
> I have problem on how to remove the source code from the pdf output.Here I 
> mean this.
>  code in sweave Rnw files
>
>  <<>>=
>  x<-c(1,2,3,4,5,6)
> x
>  mean(x)
> sd(x)
> @
> then would like it appear as
> mean = 3.5
> sd=1.3
> x=1,2,3,4,5,6
>
Try this:
<<echo=F>>=
  x<-c(1,2,3,4,5,6)
 x
  mean(x)
 sd(x)
 @

See ?RweaveLatex. Also, try
"mean = \Sexpr{mean(x)}"

in your document. You could also play with ?paste in the code chunk,
or with generating a matrix with appropriate row names, and printing
that.

Regards
Liviu

______________________________________________
R-help@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.

Reply via email to