Using the data storage type defined on this page for raster images, write the image to a PPM file (binary P6 prefered).

(Read the definition of PPM file on Wikipedia.)




 
# View the existing code in the library
library(pixmap)
pixmap::write.pnm
 
#Usage
write.pnm(theimage, filename)
 