| randGrid | R Documentation |
Grid objectRandom drawing of a Grid object
randGrid(
dim = 1L + rpois(1L, lambda = 3),
nxMin = 1L,
nxE = 4L,
nlevels,
dimNames
)
dim |
The spatial dimension. |
nxMin |
Minimum number of nodes. Integer vector of length 1
or |
nxE |
Expected number of nodes. Numeric vector of length 1
or |
nlevels |
Integer vector giving the number of levels for each spatial dimension. |
dimNames |
Names of the spatial dimensions. |
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.
An object with S4 class "Grid".
This function is not not for drawing random design points from within the object.
Yves Deville
Grid-class.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.