I would like to get monochrome images using plot function. But it keeps on producing color images. I even had monochrome images that i plotted using plot function and i got them in some weird green and orange color. How can i make plot function provide monochrome images? I tried to read about getValues function but found it difficult to understand as i am not from image analysis background. It seems that getBlocks() function returns monochrome images. But is there a way to get monochrome images using just plot function?
library(raster)
r <- raster(matrix(runif(100), 10))
plot(r)
#even below lines produce a yellow color image. i thought that they will produce a black or white square
r <- raster(matrix(rep(0,100), 10))
plot(r)