encodePNG(plotLoc)
f <- tempfile(fileext = ".png") png(f) plot(1:10) dev.off() encodePNG(f)
Run the code above in your browser using DataLab