Write the raster (resize the data unit if empty).
This is a shortcut for:
Anything more complex (e.g. region-wise writing) can be done via raster().
raster()