cgi {RGeoS}R Documentation

Center of Gravity and Inertia

Description

Calculate the Center of Gravity and the Inertia

Usage

cgi(db, name = NA, flag.plot=TRUE, flag.ellipse=TRUE, 
col=1, density=0, ...)

Arguments

db

Name of the db-class which contains the data

name

Name of the variable used for calculating the gravity center and the inertia. If not defined, the sample coordinates are used only

flag.plot

When TRUE, the gravity center and the inertia are represented graphically

flag.ellipse

When TRUE, the inertia ellipse is represented

col

Color used for representing the gravity center and the inertia (used when flag.plot=TRUE)

density

Density of the shadin lines (see polygon)

...

Additional parameters passed to the function polygon()

Details

The Center of Gravity and Inertia are calculated from the data location. If the argument 'name' is specified, the calculations take it into account. Finally a weight can be attached to each datum (if a variable is assigned to the locator "w").

Value

A list which contains the following information:

* inertia : Value of the inertia

* weight : Total weight

* center : Coordinates of the center of gravity

* mvalue : Vector of Eigen values

* mvector : Matrix of the Eigen vectors


[Package RGeoS version 9.1.1 Index]