R/MakeGridFromCoords.R

## Function to create a set of grid cells based on a set of x and y coordinates
#
#	x				-	Vector of x-coordinates of the grid cells
#	y				-	Vector of y-coordinates of the grid cells
#
MakeGridFromCoords <- function(x, y)
{
	out <- .External(
		"MakeGridFromCoords",
		x = as.double(x),
		y = as.double(y),
		PACKAGE = "ecomodtools")
	data.frame(
		x1 = out$x1,
		x2 = out$x2,
		y1 = out$y1,
		y2 = out$y2)
}

Try the ecomodtools package in your browser

Any scripts or data that you put into this service are public.

ecomodtools documentation built on May 2, 2019, 4:58 p.m.