randGrid: Random drawing of a 'Grid' object

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

Random drawing of a Grid object

Usage

1
2
randGrid(dim = 1L + rpois(1L, lambda = 3), nxMin = 1L, nxE = 4L, nlevels,
  dimNames)

Arguments

dim

The spatial dimension.

nxMin

Minimum number of nodes. Integer vector of length 1 or dim.example(Grid).

nxE

Expected number of nodes. Numeric vector of length 1 or dim.

nlevels

Integer vector giving the number of levels for each spatial dimension.

dimNames

Names of the spatial dimensions.

Details

The nodes are drawn by first choosing their number for each spatial dimension using a Poisson distribution, and then by drawing a sample of the uniform distribution with the suitable size.

Value

An object with S4 class "Grid".

Note

This function is not not for drawing random design points from within the object.

Author(s)

Yves Deville

See Also

Grid-class.

Examples

1
2
3
4
5
6
7
set.seed(1234)
## specify dim: number of levels are random!
GD <- randGrid(dim = 4)
plot(GD)
## specify number of levels (hence dim)
GD2 <- randGrid(nlevels = c(2, 3, 4))
plot(GD2)

smint documentation built on April 14, 2017, 1:49 p.m.