For test purpose, I want to create a large raster within R and write it to
disk. However, I find myself in the situation where I can't write to my
raster since it is too big to manage in memory while not being able to
write to disk since the raster has no values.

Here are the different strategies I've taken, but all failed :
```
r <- raster(matrix(1, nrow = 1e5, ncol = 1e5))
r <- raster(nrow = 1e5, ncol = 1e5)
r <- setValues(r, 1)
r <- calc(r, function(x) 1, filename = "big_raster")
values(r) <- 1
writeRaster(r, filename = "big_raster")
```

Any solution ?

Etienne

	[[alternative HTML version deleted]]

