Learn R Programming

wk (version 0.9.4)

wk_handle.wk_grd_xy: Handler interface for grid objects

Description

Handler interface for grid objects

Usage

# S3 method for wk_grd_xy
wk_handle(handleable, handler, ..., data_order = c("y", "x"))

# S3 method for wk_grd_rct wk_handle(handleable, handler, ..., data_order = c("y", "x"))

Value

The result of the handler.

Arguments

handleable

A geometry vector (e.g., wkb(), wkt(), xy(), rct(), or sf::st_sfc()) for which wk_handle() is defined.

handler

A wk_handler object.

...

Passed to the wk_handle() method.

data_order

A vector of length 2 describing the order in which values should appear. The default, c("y", "x"), will output values in the same order as the default matrix storage in R (column-major). You can prefix a dimension with - to reverse the order of a dimension (e.g., c("-y", "x")).

Examples

Run this code
wk_handle(grd(nx = 3, ny = 3), wkt_writer())
wk_handle(grd(nx = 3, ny = 3, type = "centers"), wkt_writer())

Run the code above in your browser using DataLab