| write_stars | R Documentation | 
write stars object to gdal dataset (typically: to file)
write_stars(obj, dsn, layer, ...)
## S3 method for class 'stars'
write_stars(
  obj,
  dsn,
  layer = 1,
  ...,
  driver = detect.driver(dsn),
  options = character(0),
  type = if (is.factor(obj[[1]]) && length(levels(obj[[1]])) < 256) "Byte" else "Float32",
  NA_value = NA_real_,
  update = FALSE,
  normalize_path = TRUE,
  scale_offset = c(1, 0)
)
## S3 method for class 'stars_proxy'
write_stars(
  obj,
  dsn,
  layer = 1,
  ...,
  driver = detect.driver(dsn),
  options = character(0),
  scale_offset = c(1, 0),
  type = "Float32",
  NA_value = NA_real_,
  chunk_size = c(dim(obj)[1], floor(2.5e+07/dim(obj)[1])),
  progress = TRUE
)
detect.driver(filename)
| obj | object of class  | 
| dsn | gdal dataset (file) name | 
| layer | attribute name; if missing, the first attribute is written | 
| ... | passed on to gdal_write | 
| driver | driver driver name; see st_drivers | 
| options | character vector with dataset creation options, passed on to GDAL | 
| type | character; output binary type, one of:  | 
| NA_value | non-NA value that should represent R's  | 
| update | logical; if  | 
| normalize_path | logical; see read_stars | 
| scale_offset | length 2 numeric vector with scale, offset values: raw values computed by raw = (value - offset) / scale are written to dsn; scale and offset values are written to dsn or else a warning is raised | 
| chunk_size | length two integer vector with the number of pixels (x, y) used in the read/write loop; see details. | 
| progress | logical; if  | 
| filename | character; used for guessing driver short name based on file extension; see examples | 
write_stars first creates the target file, then updates it sequentially by writing blocks of chunk_size.
in case obj is a multi-file stars_proxy object, all files are written as layers into the output file dsn
detect.driver("L7_ETMs.tif")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.