Learn R Programming

surveillance (version 1.20.3)

scale.gpc.poly: Centering and Scaling a "gpc.poly" Polygon

Description

This is a re-implementation of the corresponding method from package gpclib to also allow centering.

Usage

# S3 method for gpc.poly
scale(x, center = c(0,0), scale = c(1,1))

Value

A "gpc.poly", the shifted and/or scaled version of x.

Arguments

x

an object of class "gpc.poly".

center

numeric vector of length 2 (x,y), which will be subtracted from the respective coordinates of x.

scale

numeric vector of length 2 (x,y), which serves as the divisor for the respective coordinates of x.