Description Usage Arguments Value Author(s) See Also Examples
A function to create a data frame of cell boundary values from vectors of x and y coordinates. This function is commonly used to create inputs suitable for entry into the LatticeTransitionProbs
function.
1 | MakeGridFromCoords(x, y)
|
x |
A double vector denoting the locations of cell boundaries of a lattice on the x-axis. |
y |
A double vector denoting the locations of cell boundaries of a lattice on the y-axis. |
A data frame with (length(x.coords) - 1) * (length(y.coords) - 1)
rows containing the boundary coordinates for each cell in the lattice:
x1 |
Lower x-coordinate of each cell in the lattice |
x2 |
Upper x-coordinate of each cell in the lattice |
y1 |
Lower y-coordinate of each cell in the lattice |
y2 |
Upper y-coordinate of each cell in the lattice |
Joseph Chipperfield <joechip90@googlemail.com>
1 2 3 4 5 | # Create a data frame of cell boundary coordinates of cell of a 5x5
# lattice with regular cell length of one unit
x.coords <- seq(0.0, 5.0, 1.0)
y.coords <- seq(0.0, 5.0, 1.0)
MakeGridFromCoords(x.coords, y.coords)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.