Learn R Programming

stars (version 0.1-1)

read_stars: read raster/array dataset from file or connection

Description

read raster/array dataset from file or connection

Usage

read_stars(.x, ..., options = character(0), driver = character(0),
  sub = TRUE, quiet = FALSE, NA_value = NA_real_, along = NA)

Arguments

.x

if character, name of file(s) to read; if list: list with arrays

...

ignored

options

character; opening options

driver

character; driver to use for opening file

sub

integer or logical; sub-datasets to be read

quiet

logical; print progress output?

NA_value

numeric value to be used for conversion into NA values; by default this is read from the input file

along

character or integer; in case .x contains multiple files, along which dimension should objects be merged? NA will merge arrays as new attributes if all objects have identical dimensions, or else try to merge along time if time stamps differ. A positive value (or name) will merge along that dimension, or create a new dimension.

Value

object of class stars

Examples

Run this code
# NOT RUN {
tif = system.file("tif/L7_ETMs.tif", package = "stars")
(x1 = read_stars(tif))
(x2 = read_stars(c(tif, tif)))
(x3 = read_stars(c(tif, tif), along = "band"))
(x4 = read_stars(c(tif, tif), along = "new_dimensions")) # create 4-dimensional array
x1o = read_stars(tif, options = "OVERVIEW_LEVEL=1")
# }

Run the code above in your browser using DataLab