grd_data: Grid data interface

Description Usage Arguments Value Examples

View source: R/data.R

Description

Grid data interface

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
grd_data(grid)

grd_data_ptype(grid_data)

## S3 method for class 'array'
grd_data_ptype(grid_data)

grd_data_collect(
  grid_data,
  i = NULL,
  j = NULL,
  ...,
  ptype = grd_data_ptype(grid_data)
)

## S3 method for class 'array'
grd_data_collect(
  grid_data,
  i = NULL,
  j = NULL,
  ...,
  ptype = grd_data_ptype(grid_data)
)

grd_data_subset(grid_data, i = NULL, j = NULL, ...)

## Default S3 method:
grd_data_subset(grid_data, i = NULL, j = NULL, ...)

## S3 method for class 'nativeRaster'
grd_data_subset(grid_data, i = NULL, j = NULL, ...)

grd_data_order(grid_data)

## Default S3 method:
grd_data_order(grid_data)

## S3 method for class 'nativeRaster'
grd_data_order(grid_data)

Arguments

grid

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

grid_data

The data member of a grd(). This is typically an array but can also be an S3 object with the proper methods implemented (e.g., grd_data_generic()).

i, 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

Examples

1
2
grd_data(grd(nx = 3, ny = 2))
grd_data_subset(matrix(1:6, nrow = 2), 2, 3)

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