Learn R Programming

SeaVal (version 1.1.1)

complete_regular_grid: Expand Regular Spatial Grid

Description

First checks whether the spatial coordinates in a data table are part of a regular grid. If they are, the function returns the smallest regular complete grid including all coordinates. See set_spatial_grid for more information.

Usage

complete_regular_grid(dt)

Value

A data table with the completed spatial grid. Has the grid-attribute.

Arguments

dt

A data table object containing the spatial grid with coordinates.

Examples

Run this code
  dt = data.table(lon = c(1, 2, 3), lat = c(1, 2, 3))
  completed_grid = complete_regular_grid(dt)
  print(completed_grid)


Run the code above in your browser using DataLab