Learn R Programming

geoCount (version 1.150120)

locGrid: Simulate Locations on Grid

Description

This function simulates a given number of locations distributed on a grid.

Usage

locGrid(x, y, nx, ny)

Arguments

x
the length of x edge
y
the length of y edge
nx
the number of locations in x direction
ny
the number of locations in y direction

Value

A $(nx\times ny) \times 2$ matrix indicates the x-y coordinates of the locations.

Details

The grid lies in the range of $(0, x) \times (0, y)$.

See Also

locCircle, locSquad, simData, plotData.

Examples

Run this code
## Not run: 
#   loc <- locGrid(1, 2, 10, 5)
#   plot(loc, xlab="x", ylab="y")
# ## End(Not run)

Run the code above in your browser using DataLab