scale.gpc.poly {surveillance}R Documentation

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 class 'gpc.poly'
scale(x, center = c(0,0), scale = c(1,1))

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.

Value

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


[Package surveillance version 1.17.0.9000 Index]