generate_grid {sim2Dpredictr}R 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.


[Package sim2Dpredictr version 0.1.1 Index]