Need to install screenshot.exe on Win by install_screenshot().
Details
The command is always quoted, so that a path with a space (such as "C:/Program Files/R/R-4.5.1/library/screenshot") works.
Examples
if(interactive()){
sc <- screenshot()
if(sc != ""){
sc_image <- imager::load.image(sc)
plot(sc_image)
}
}