Is there a way print an existing PNG file to the device window, for example, let\'s say that you have saved a plot as PNG but you would like to preview it (for sanity) befor
Baptiste's answer didn't work for me while using RStudio in Linux. I had to remove the system.file() call.
system.file()
library(png) img <- readPNG('/path/image.png') grid::grid.raster(img)