layer_to_matrix: Get 'stars' layer values as matrix

Description Usage Arguments Value Examples

View source: R/layer_to_matrix.R

Description

Extracts the values of a single layer in a stars object to a matrix.

Usage

1

Arguments

x

A stars raster with one attribute and two dimensions, x and y, i.e., a single-band raster.

check

Whether to check (and fix if necessary) that input has one attribute, one layer and x-y as dimensions 1-2 (default is TRUE).

Value

A matrix with the layer values, having the same orientation as the raster (i.e., rows represent the y-axis and columns represent the x-axis).

Examples

1
2
3

starsExtra documentation built on Nov. 18, 2021, 5:08 p.m.