[Tex/LaTex] Trying to get rid of the included chunk in sweave document.

markdownrrstudiosweave

I just translated the mosaic manuals and I'm giving format to them. I'm using this chunk for all the packages, but it's still printing me the whole chunk at the first page of the book:

<<include=F, results=hide, message=FALSE, warning=FALSE>>=

Best Answer

Please, always include a minimal reproducible example: see here and there

I guess, what you're looking for is echo=FALSE.

In a file Example.rnw

\documentclass{article}

\begin{document}
\SweaveOpts{concordance=TRUE}


What I want to see

<<reg, echo = FALSE, results=hide>>=
# I don't want to see it
n <- 50
x <- seq(1, n)
a.true <- 3
b.true <- 1.5
y.true <- a.true + b.true * x
s.true <- 17.3
y <- y.true + s.true * rnorm(n)
out1 <- lm(y ~ x)
summary(out1)
@

\end{document}
Related Question