Description Usage Arguments Value Note Author(s) See Also Examples
Use this function to shift a categorical map by a specified number of pixels up, down, left, or right. The shifted pixels are wrapped around to the opposite edge of the map.
1 | shift(map = demoimage1, dir = 1, n = 1, draw = TRUE, verbose = TRUE)
|
map |
A required input categorical map as a matrix. Currently, the requirement is that the x and y dimensions are equal. |
dir |
An integer (1,2,3, or 4) that identifies the shift direction: up, right, down, or left respectively. |
n |
The number of pixels to shift. |
draw |
A boolean flag indicating whether results will be drawn to the graphics window. |
verbose |
A boolean flag indicating whether verbose feedback is provided to standard output. |
If valid parameters are set, the output will be the shifted map object as a matrix. Otherwise, error messages are provided and NULL is returned.
This results of this function should be saved to an object.
Tarmo K. Remmel
See Also fixedcolimage
, demoimage1
1 2 | data(demoimage1)
shift(demoimage1, dir=2, n=3, draw=TRUE, verbose=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.