R: Not able to save the plot -


this question has answer here:

i generating plot able see in rmarkdown output whenever trying save it, getting blank(white) image. adding following 2 lines before , after plot

png("output.png") #plot code dev.off() 

it working. , stopped working. can me on this??

edit

when pdf

pdf("output.pdf") #plot code dev.off() 

i getting error as:

there error opening document. document cannot opened because has no pages.  

thanks.

from comments gather right, need print resulting ggplot2 object in order show plot, see r faq 7.22.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -