Take the 2-minute tour ×

How to disable message null device when using R and latex.

<<echo=FALSE ,results=tex>>=
barplot(as.matrix(disease_data),beside=TRUE, col=c("burlywood1 ","orange2"), horiz=TRUE,cex.names=1.0, border ="white")

I have already disable echo but null device is on image. How can i avoid it?

Regards Regards

share|improve this question
add comment

1 Answer

echo=FALSE only hides the R code; if you want to hide the output, you should use results=hide.

But why do you have to use pdf() and dev.off() to manually create a PDF plot? This is too awkward. You should leave this job to Sweave.

share|improve this answer
Now i am using sweave but i can not reduce image size that is why i am using includegraphics by passing width and height to control its size. Is there any way to reduce plot size in R? –  manish Apr 25 '12 at 2:51
yes, that is one of the tiny reasons which motivated my knitr package, which allows you to control the size of your plots easily; see yihui.name/knitr or the manual github.com/downloads/yihui/knitr/knitr-manual.pdf –  Yihui Apr 25 '12 at 5:28
add comment

Your Answer


