save_raster: Save a raster to file.

Description Usage Arguments Value

View source: R/raster.R

Description

saves raster object to file. By default, asks permission to overwrite an existing file.

Usage

1
save_raster(x, path = ".", fname = NULL, type = "tif", overwrite = NULL, ...)

Arguments

x

raster* object to save.

path

path in which to save. May be relative or absolute.

fname

character vector, length one. Base of file name (not including the extension, which is determined by file type). If no file name is provided, default behaviour is to use the object name as the file name.

type

file type to save. Default is ".tif". Accepts any type handled by raster::writeRaster.

overwrite

logical. Whether to overwrite existing files of same name. Default value of NULL causes function to ask for permission if an existing file would be overwritten.

...

optional parameters passed through to raster::writeRaster.

Value

invisibly returns the full name (including path) of the saved raster.


domwoolf/soilsRevealed documentation built on May 19, 2020, 10:30 p.m.