Yes, there are working examples in the Rcpp package. See the functionCallback/newApiExample.r in the examples/ directory.
You may need to experiment with sleep() to “hold” the chart for a moment, or put it into a file and then display the file. It all depends on you, but you have said little.
Dirk eddelbuettel
source share