Learn R Programming

frenchCurve (version 0.2.0)

as_polygon: Make a Simple Polygon or Points

Description

A simple polygon is here defined as a data frame with numeric components x and y without any duplicate rows. The order of rows is significant in defining the associated figure.

Usage

as_polygon(x, y = NULL, ...)

# S3 method for default as_polygon(x, y = NULL, ...)

# S3 method for curve as_polygon(x, y = NULL, ...)

as_points(x, y = NULL)

Arguments

x, y

any specification of 2-d points, or a "curve" object

...

additional arguments not currently used

Value

a data frame with components x and y

Details

A 'points' object is defined as a data frame with numeric columns x and y.