Handle specific regions of objects

# S3 method for data.frame
wk_handle_slice(handleable, handler, from = NULL, to = NULL, ...)

wk_handle_slice(
  handleable,
  handler = wk_writer(handleable),
  from = NULL,
  to = NULL,
  ...
)

# S3 method for default
wk_handle_slice(
  handleable,
  handler = wk_writer(handleable),
  from = NULL,
  to = NULL,
  ...
)

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.

from

1-based index of the feature to start from

to

1-based index of the feature to end at

...

Passed to the wk_handle() method.

Value

A subset of handleable

Examples

wk_handle_slice(xy(1:5, 1:5), wkt_writer(), from = 3, to = 5)
#> <wk_wkt[3]>
#> [1] POINT (3 3) POINT (4 4) POINT (5 5)
wk_handle_slice(
  data.frame(let = letters[1:5], geom = xy(1:5, 1:5)),
  wkt_writer(),
  from = 3, to = 5
)
#> <wk_wkt[3]>
#> [1] POINT (3 3) POINT (4 4) POINT (5 5)