shift: A tool for shifting a categorical map horizontally or...

Description Usage Arguments Value Note Author(s) See Also Examples

Description

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.

Usage

1
shift(map = demoimage1, dir = 1, n = 1, draw = TRUE, verbose = TRUE)

Arguments

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.

Value

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.

Note

This results of this function should be saved to an object.

Author(s)

Tarmo K. Remmel

See Also

See Also fixedcolimage, demoimage1

Examples

1
2
data(demoimage1)
shift(demoimage1, dir=2, n=3, draw=TRUE, verbose=TRUE)

hdeco documentation built on May 30, 2017, 8:26 a.m.