See repro code in:
https://rdotnet.codeplex.com/discussions/446998
Work over Nov 2013 to Jan 2013 makes the diagnosis easier.
Comments: hi @jperraud i was trying to save an image from r.net, i have follow your instruction above, but it did not work for me below is my coding ``` engine.Evaluate("pospng <- ggplot(postdmdf, aes(x=term, y=freq)) + geom_bar(stat='identity', fill='#6cd054')+xlab('Terms') + ylab('Count') +coord_flip()"); engine.Evaluate("png('D:/somewhere/firsttry.png')"); engine.Evaluate("print(pospng)"); engine.Evaluate("dev.off()"); ``` at this line ``` engine.Evaluate("print(pospng)"); ``` it said pospng not found and i did try this way to save image ``` engine.Evaluate("setwd('D:/somewhere')"); engine.Evaluate("pospng <- ggplot(postdmdf, aes(x=term, y=freq)) + geom_bar(stat='identity', fill='#6cd054')+xlab('Terms') + ylab('Count') +coord_flip()"); engine.Evaluate("ggsave('somethingpos.png', width=8, height=4, dpi=100)"); ``` and get this error ``` Error in ggsave("somethingpos.png", width = 8, height = 4, dpi = 100) : plot should be a ggplot2 plot ```
https://rdotnet.codeplex.com/discussions/446998
Work over Nov 2013 to Jan 2013 makes the diagnosis easier.
Comments: hi @jperraud i was trying to save an image from r.net, i have follow your instruction above, but it did not work for me below is my coding ``` engine.Evaluate("pospng <- ggplot(postdmdf, aes(x=term, y=freq)) + geom_bar(stat='identity', fill='#6cd054')+xlab('Terms') + ylab('Count') +coord_flip()"); engine.Evaluate("png('D:/somewhere/firsttry.png')"); engine.Evaluate("print(pospng)"); engine.Evaluate("dev.off()"); ``` at this line ``` engine.Evaluate("print(pospng)"); ``` it said pospng not found and i did try this way to save image ``` engine.Evaluate("setwd('D:/somewhere')"); engine.Evaluate("pospng <- ggplot(postdmdf, aes(x=term, y=freq)) + geom_bar(stat='identity', fill='#6cd054')+xlab('Terms') + ylab('Count') +coord_flip()"); engine.Evaluate("ggsave('somethingpos.png', width=8, height=4, dpi=100)"); ``` and get this error ``` Error in ggsave("somethingpos.png", width = 8, height = 4, dpi = 100) : plot should be a ggplot2 plot ```