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