I've been trying to do some raster image manipulation in R language using grid package. The problem is that I cannot retrive a return value from grid.raster function. When I do:
result <- grid.raster(inputData)
instead of "a rastergrob grob" (as specified in a documentation) I receive a NULL
object.
I've double checked it with an example from the documentation:
redGradient <- matrix(hcl(0, 80, seq(50, 80, 10)), nrow=4, ncol=5)
grid.newpage()
result <- grid.raster(redGradient)
Still result
is just a NULL
object. Is R doing some return value interception here? If so, how can I get it?