genUSStateGrid: Generating a Grid over a US State

Description Usage Arguments Value Author(s) See Also Examples

Description

This function generate a grid of points over a US state with given increment size or resolution.

Usage

1
   genUSStateGrid(state, incr = NULL, resolution = NULL)

Arguments

state

the name of a US state.

incr

a numeric vector of length 2 specifying the increment in longitude and latitude.

resolution

a numeric vector of length 2 specifying the size of the grid in longitude and latitude.

Value

A data.frame:

lon

longitude of the grid point.

lat

latitude of the grid point.

id

the id number of the county in which the grid point is located.

county

the name of the county in which the grid point is located.

Author(s)

Jun Yan [email protected]

See Also

genUSStateSites

Examples

1
2
3
mygrid <- genUSStateGrid('iowa', resolution=c(8, 4))
map('state', 'iowa')
points(mygrid)

brian-j-smith/ramps documentation built on May 12, 2019, 5:44 a.m.