[R] hide output in SWeave documents; was: R_WinEdt question

Uwe Ligges ligges at statistik.uni-dortmund.de
Mon Dec 4 08:29:33 CET 2006


Why is the question below related to RWinEdt? It looks to me like an 
SWeave question. Please read its manual.
The answer is to add the option results=hide to the code chunk's header:

<<R code,echo=FALSE,results=hide>>=

BTW: I do not understand why you want to call summary() but not print 
its results.

Uwe Ligges


Aimin Yan wrote:
> Hello,
> I am new to R-WinEdt. Here is my code. If I don't want see output for 
> summary(mp) in my final document, just want to run it.
> How to modify these code?
> 
> Thanks,
> 
> Aimin Yan
> 
> <<R code,echo=FALSE>>=
> library(MASS)
> options(contrasts=c("contr.treatment","contr.poly"))
> p5 <- read.csv("http://www.public.iastate.edu/~aiminy/data/p_5_2.csv")
> 
> p5 <- read.csv("http://www.public.iastate.edu/~aiminy/data/p_5_2.csv")
> attach(p5)
> mp<-glm(Y~P-1,data=p5)
> summary(mp)
> @
> 
> ______________________________________________
> R-help at stat.math.ethz.ch 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.




More information about the R-help mailing list