[Rcpp-devel] Display ggplot2 output to Qt Gui

Dirk Eddelbuettel edd at debian.org
Thu May 7 12:57:38 CEST 2015


On 7 May 2015 at 15:08, Jodi Jhouranda Siregar wrote:
| command = QString("library(ggplot2);svg(width=6,height=6,pointsize=10,filename=tfile);qplot(dframe$Shape_Leng, data=dframe, geom='histogram');dev.off();");
| 
| rconn.parseEvalQ(command.toStdString());
| 
| 
| i try to do that, i get this error.
| 
| Cannot read file 'C:\Users\JODIJS~1\AppData\Local\Temp\file87c57a9743b', because: Premature end of document.
| 
| 
| but when i use hist() or plot() method it works. how to display ggplot2 output to Qt?

You probably just need   print(...)  around it.  See R FAQ 7.22 at 
http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-do-lattice_002ftrellis-graphics-not-work_003f

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org


More information about the Rcpp-devel mailing list