Learn R Programming

geo (version 1.4-3)

geoexpand: expands a grid to a dataframe.

Description

Expands a grid to a dataframe simular to expand.grid.

Usage

geoexpand(grid)

Arguments

grid
The grid to be expanded, a list containing vectors \$lat and \$lon.

Value

A dataframe of the grid.

Side Effects

None.

See Also

expand.grid.

Examples

Run this code
grd <- list(lat=seq(63,67,length=30),lon=seq(-28,-10,length=50))
       # a list with length(lat) = 30 and length(lon) = 50

       grd1<- geoexpand(grd)
       # a 30 by 50 dataframe made.

       # See also examples in geocontour.

Run the code above in your browser using DataLab