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) before placing it in a presentation or a document.
Ideally, I'd like to be able to 'push' the image into the RStudio 'plots' window.
How to open a PNG file. Nearly all built-in image editing programs can open PNG files. Whether you use a Mac or Windows computer, simply search for the file name and double-click on it. You can then choose the program you want to use from the list of options your computer gives you.
You can right click on PNG file, select Open with > Photos. Note that Photos app came pre-installed with Windows 10. If you still can't find Photos app on your system, install it from Microsoft Store. Hope this helps!
You can import it and display it in R,
library(png) img <- readPNG(system.file("img", "Rlogo.png", package="png")) grid::grid.raster(img)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With