R – image of a pixel matrix?

You can display it on the screen easiest using ‘image’:

m = matrix(runif(100),10,10)
par(mar=c(0, 0, 0, 0))
image(m, useRaster=TRUE, axes=FALSE)

You can also have a look at the raster package…

Leave a Comment