# read a sample file (R logo)
img <- readPNG(system.file("img","Rlogo.png",package="png"))
# if your R supports it, we'll plot it
if (exists("raster")) { # can plot only in R 2.11.0 and higher
plot(1:2,type='n',)
raster(img,1.2,1.27,1.8,1.73)
}
Run the code above in your browser using DataLab