generate_grid: Convert a 2D Space to Grid Coordinates

View source: R/generate_grid.R

generate_gridR Documentation

Convert a 2D Space to Grid Coordinates

Description

Input the limits of a 2D space and the desired image resolution, then the function outputs the appropriate grid/lattice coordinates.

Usage

generate_grid(im.res, xlim = c(0, 1), ylim = c(0, 1))

Arguments

im.res

A vector specifying the dimension/resolution of the image. The first entry is the number of 'rows' in the lattice/image, and the second entry is the number of columns' in the lattice/image.

xlim, ylim

These are the 2D image limits. Defaults for both are c(0, 1). It is not recommended to alter these arguments unless changing the limits has a specific practical utility.

Value

A data frame whose first column is x-coordinates and whose second column is y-coordinates.


jmleach-bst/sim2Dpredictr documentation built on March 4, 2024, 5:57 p.m.