I've been using the fasterize package lately to convert sf polygons to rasters:
https://cran.rstudio.com/web/packages/fasterize/fasterize.pdf
When I am dealing with large files, it would be better for me to write directly to disk instead of memory. So for example rather than doing this:
fasterize(polygon_file, raster_template, field = 'value')
I would do this:
fasterize(polygon_file, raster_template, field = 'value', file = 'output.tif')
This does not seem possible. Does anyone have a suggestion as to how to do this?
Thanks.