Skip to content

colour by z value, persp in raster package

3 messages · David Winsemius, Omphalodes Verna

#
On Feb 28, 2012, at 4:34 AM, Omphalodes Verna wrote:

            
Is that really an example? After going to the trouble of correcting  
the error in this code from failing to load the raster package, I now  
see that there is no connection between the values of x, y, or x with  
the raster-call.

 > r1[] <- as.matrix(z)
Error in .local(x, values) : cannot use a matrix with these dimensions
Error in .local(x, i, j, ..., value) :
cannot replace values on this raster (it is too large
 > persp(r1)
Error: hasValues(x) is not TRUE

#   Post some useful code.