grd_tile: Extract normalized grid tiles

Description Usage Arguments Value Examples

View source: R/tile.R

Description

Extract normalized grid tiles

Usage

1
2
3
4
grd_tile(grid, level, i, j = NULL, ..., ptype = grd_data_ptype(grd_data(grid)))

## S3 method for class 'grd_rct'
grd_tile(grid, level, i, j = NULL, ..., ptype = grd_data_ptype(grd_data(grid)))

Arguments

grid

A grd_xy(), grd_rct(), or other object implementing grd_*() methods.

level

An integer describing the overview level. This is related to the step value by a power of 2 (i.e., a level of 1 indicates a step of 2, a level of 2 indicates a step of 4, etc.).

i

1-based index values. i indices correspond to decreasing y values; j indices correspond to increasing x values. Values outside the range 1:nrow|ncol(data) will be censored to NA including 0 and negative values.

j

1-based index values. i indices correspond to decreasing y values; j indices correspond to increasing x values. Values outside the range 1:nrow|ncol(data) will be censored to NA including 0 and negative values.

...

Passed to S3 methods

ptype

The R object type that should be used to represent the data.

Value

A grd_collect()ed version

Examples

1
2
3
grid <- grd_rct(volcano)
plot(grd_tile(grid, 4, 1, 1))
plot(grd_tile(grid, 3, 1, 1), add = TRUE)

paleolimbot/grd documentation built on Dec. 22, 2021, 6:38 a.m.