Learn R Programming

R2G2 (version 1.0-2)

FancyPies: Computes the edges of any regular n-sided figure in spherical coordinates and adds a pie chart within it

Description

Provides coordinates for one pie chart, this function must be iterated to produce several pies.

Usage

FancyPies(center, obs, nedges = 3, radius = 5e4, orient = 0, diag = FALSE)

Arguments

center
The geographical position of the pie as c(lon, lat) in decimal degrees.
obs
Vector of numerical and non-negative quantities that will be displayed as the pie slices (typically produced using table()).
nedges
The number of desired edges (3 -> triangle, 4 -> square, etc).
radius
The pie radius (in meters).
orient
The rotation factor of the fig (in degrees).
diag
Produce diagnostic plot for checking purposes (True or False).

Value

Provides an array of coordinates for drawing the pie chart as polygons (lines = points delimiting the pie sectors, columns = sector number, lon, lat in decimal degrees).

Details

This function is wrapped within Pies2GE; see below.

See Also

curvy GetEdges Pies2GE