Skip to contents

RegularGrid: square or hexagonal cell centres. TriangularGrid: equilateral triangular mesh (zero-based vertex indices). TransfiniteGrid: Coons-patch curvilinear grid. SystematicSample: square grid sample with a Philox random start. SpaceTimeSample: static, synchronous, static-synchronous and rotating designs (zero-based unit indices). Identical to the Python arm morie.fn.gridgen.

Usage

RegularGrid(bbox, cellsize, shape = "square")

TriangularGrid(bbox, side)

TransfiniteGrid(bottom, top, left, right)

SystematicSample(bbox, spacing, seed = 0, polygon = NULL)

SpaceTimeSample(
  n_population,
  n_sample,
  n_times,
  design = "static",
  n_static = NULL,
  rotation = 2,
  seed = 0
)

Arguments

bbox

c(xmin, ymin, xmax, ymax).

cellsize

Cell size (centre spacing).

shape

"square" or "hexagon".

side

Triangle side.

bottom, top

Boundary curves sampled at nu points (two-column).

left, right

Boundary curves sampled at nv points.

spacing

Grid spacing.

seed

Philox seed.

polygon

Optional polygon vertices (two-column).

n_population, n_sample, n_times

Population size, sample size, occasions.

design

Design name.

n_static

Static panel size.

rotation

Occasions each unit stays in a rotating panel.

Value

A matrix or list.

References

Gordon, W. J. and Hall, C. A. (1973). Construction of curvilinear co-ordinate systems. International Journal for Numerical Methods in Engineering 7, 461-477.

de Gruijter, J. J., Brus, D. J., Bierkens, M. F. P. and Knotters, M. (2006). Sampling for Natural Resource Monitoring. Springer.

Examples

RegularGrid(c(0, 0, 2, 1), 1)
#>      [,1] [,2]
#> [1,]  0.5  0.5
#> [2,]  1.5  0.5