The following code displays a GIF image in a Tk window (actually in a Tk label widget within a Tk window).
Tk supports natively PNG, GIF, PPM and PGM images. For other formats, you can install the Tk Img package and use
tclRequire("Img") in R to make it available to R tcltk. From this moment on, you have also access to TIFF, JPEG, BMP, XBM, …, images.