Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using ASREML-R for data analysis. When I fit the model in ASREML-R, it produces some information regarding the model like this

dat <- data.frame(y=rnorm(20),x=seq(1,20))
ex.asr <- asreml(y ~ x, data=dat)


asreml(): 3.0.1 Library: 3.01gl IA32  Run: Wed Jan 11 16:53:31 2012

     LogLik         S2      DF
    -13.3387      0.9556    18  16:53:31
    -13.3387      0.9556    18  16:53:31

Finished on: Wed Jan 11 16:53:31 2012

LogLikelihood Converged 

and even using <<echo=FALSE>>= in Sweave produces this extra Schunk

\begin{Schunk}
\begin{Soutput}

asreml(): 3.0.1 Library: 3.01gl IA32  Run: Wed Jan 11 16:53:31 2012

     LogLik         S2      DF
    -13.3387      0.9556    18  16:53:31
    -13.3387      0.9556    18  16:53:31

Finished on: Wed Jan 11 16:53:31 2012

LogLikelihood Converged 

\end{Soutput}
\end{Schunk}

I wonder how can I remove this extra information to display in my final output.

share|improve this question
    
Can't you just put <<echo=FALSE>>= before the code chunk in your .Rnw file? –  Alan Munn Jan 11 '12 at 23:32
    
Thanks @Alan for your comment and suggestion. But this does not work in this case. Anyhow thanks. –  MYaseen208 Jan 11 '12 at 23:44
add comment

1 Answer

up vote 3 down vote accepted

echo=FALSE suppresses printing of the input. To hide the output, you need to add results=hide:

<<...,echo=FALSE,results=hide>>=

  # Your code here

@
share|improve this answer
    
Duh. I don't know what I was thinking with my comment. That's what I meant to write. –  Alan Munn Jan 12 '12 at 1:08
    
(+1) @Sharpie: Thanks a lot. This works fine. Thanks again. –  MYaseen208 Jan 12 '12 at 1:58
    
@AlanMunn: No worries, I get echo and results mixed up all the time when I haven't written any Sweave in a while. –  Sharpie Jan 12 '12 at 2:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.