I note mention of RasterLayerSparse in the raster package documentation
e.g. under setValues()

Is it possible to setValues from a sparse matrix? can the values be stored
in the raster object in sparse form to save memory?
Trying to create "sparse raster"  the sparse matrix is not accepted:
library(raster)
library(Matrix)
m<-matrix(c(0,0,1),3,3)
M<-Matrix(m)
> M
3 x 3 sparse Matrix of class "dtCMatrix"

[1,] . . .
[2,] . . .
[3,] 1 1 1
ext<-extent(c(0,3,0,3))
R<-raster(ext,3,3)
setValues(R,M)
Error in setValues(R, M) : values must be a vector

	[[alternative HTML version deleted]]

