Closed kuwisdelu closed 3 weeks ago
Reproducible example:
set.seed(1, kind="default")
nr <- 32
nc <- 32
x <- seq(-4, 4, length.out=nr)
y <- seq(1, 3, length.out=nc)
co <- expand.grid(x=x, y=y)
x <- co$x
y <- co$y
vals <- matrix(atan(x / y), nrow=nr, ncol=nc)
vals <- rescale_range(vals, c(0, 1))
vals <- rgb(vals, vals, vals)
to_raster(x, y, vals)
Error in approx2(x, y, vals, interp = "none", nx = nx, ny = ny, tol = c(rx, :
z has an unsupported data type
This needs to work.