mod_translate: Add a translation modification to a shape

View source: R/add_mod.R

mod_translateR Documentation

Add a translation modification to a shape

Description

A translation modification moves a shape in the x and/or y directions.

Usage

mod_translate(pj, dx, dy, shape = ".", name = ".")

Arguments

pj

an object of class 'pj'.

dx

numeric vector indicating the distances for horizontal translation.

dy

numeric vector indicating the distances for vertical translation.

shape

character scalar indicating the type of shape to which the mod will be applied.

name

character scalar name to give to the specified mod. The special value "." indicates that the pj package should create a default name for the mod.

Value

pj with the translation modification applied to the specified shape.

Argument recycling

The argument set {x, y, xu, yu} is recycled with the number of subshapes defined for a given shape. For point, area, and ribbon shapes, all arguments in the set must be scalar. For segment shapes, arguments in the set must be recyclable with the number of segments defined by that shape. For shapes that define polygons, arguments in the set must be recyclable with the number of polygons defined by the shape.

See Also

Other add_mod: mod_dilate(), mod_reflect(), mod_rotate()


j-martineau/pj documentation built on March 19, 2022, 5:32 a.m.