View source: R/save_raster_rdata.R
save_raster_rdata | R Documentation |
Used to ensure that raster data is first loaded into memory so that raster data is saved into the .RData object and not left in a referenced temp file.
save_raster_rdata(raster, file)
raster |
RasterLayer; The raster layer to be saved. |
file |
a (writable binary-mode) connection or the name of the file where the data will be saved (when tilde expansion is done). |
Using save()
to write rasters to .RData files can produce
unexpected results. Large RasterLayers are not loaded into memory, but
contain a pointer to a file storing the data. save()
then only stores a
pointer to the temp file holding the data which may not be available later.
This function loads on-disk RasterLayers into memory to ensure the data is
stored in the .RData file.
None. Saves .RData file to disk.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.