snapToEdge | R Documentation |
This function is primarily for internal use by makeReference()
snapToEdge(x, cellsize, up = TRUE, offset = 0)
x |
a vector of coordinates (either x or y component) to be snapped to a cell boundary |
cellsize |
the cellsize of the grid being snapped. |
up |
if |
offset |
the distance up from the origin to the first cell boundary. |
If offset is 0 it will snap to cells aligned with the origin, otherwise offset should be the positive offset from the origin to the first cell boundary.
a vector of number close to x
that fall on cell boundaries
if up
is TRUE
they will be equal to or higher
than corresponding values in x
if FALSE
they will be the equal or lower.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.