0

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.

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

1 Answer 1

3

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

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

  # Your code here

@
3
  • Duh. I don't know what I was thinking with my comment. That's what I meant to write.
    – Alan Munn
    Jan 12, 2012 at 1:08
  • (+1) @Sharpie: Thanks a lot. This works fine. Thanks again.
    – MYaseen208
    Jan 12, 2012 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, 2012 at 2:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .