Description Arguments Value Examples
Checks if the points (xy$x, xy$y) are in the
fvcom.grid
grid
.
grid |
A |
xy |
A |
units |
Either 'll' for latitude and longitude or 'm' for meters. |
A vector of logical values of length nrow(xy)
. The
ith element is TRUE
if (xy$x[i]
,
xy$y[i]
) is in grid
and FALSE
otherwise.
1 2 3 4 5 6 7 8 9 10 | {
# Create a regular grid of test points
nodes = get.nodes(ocean.demo.grid)
lattice.grid = expand.grid(x=seq(min(nodes$x), max(nodes$x), len=25),
y=seq(min(nodes$y), max(nodes$y), len=25))
# Check which points are in the grid
in.grid = is.in.grid(ocean.demo.grid, lattice.grid, units="m")
# Plot the points that are in the grid
with(lattice.grid[in.grid,], plot(x, y))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.