Learn R Programming

HRW (version 1.0-6)

createBoundary: Boundary polygon creation

Description

Create a boundary polygon corresponding nominally to the effective probability density support of a bivariate dataset via an interactive graphical interface and mouse (or, possibly, touchpad) posititionings and button clicks.

Usage

createBoundary(x,y)

Value

A two-column matrix containing the vertices of the selected boundary polygon.

Arguments

x

vector containing the x-coordinates of a bivariate dataset.

y

vector containing the y-coordinates of a bivariate dataset.

Author

M.P. Wand matt.wand@uts.edu.au

Details

After the bivariate dataset is displayed on the screen a boundary polygon is selected by performing left mouse (or, possibly, touchpad) clicks on the screen to specify vertex positions, and then moving around in a clockwise direction until the polygon is completed. Completion is achieved by clicking inside the red octagon surrounding the starting vertex.

See Also

pointsInPoly

Examples

Run this code
library(HRW)
x <- c(4,1,9,8,3,9,7)
y <- c(5,7,5,4,2,1,1)
if (FALSE) myBoundary <- createBoundary(x,y)

Run the code above in your browser using DataLab