centroid: Centroid of a convex polygon

View source: R/centroid.R

centroidR Documentation

Centroid of a convex polygon

Description

Computes Centroid of a convex polygon in plane.

Usage

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

Arguments

x

The data as a matrix, data frame or list. If it is a matrix or data frame, then each row is viewed as one bivariate observation. If it is a list, all components must be numerical vectors of equal length (coordinates of observations).

y

The data as a matrix, data frame or list. If it is a matrix or data frame, then each row is viewed as one bivariate observation. If it is a list, all components must be numerical vectors of equal length (coordinates of observations).

...

For future use.

Details

In dimension 2, calculates centroid of a convex polygon.

Value

Returns with respect to data set, the centroid point in plane.

Author(s)

Nabil Mustafa, Saurabh Ray, and Mudassir Shabbir.

References

N. Mustafa, S. Ray, and M. Shabbir, Statistical Data Depth of Pointsets in the Plane,in prep..

See Also

inflate

Examples

## calculation of centroid of a random pointset
z = matrix(rnorm(24),nc=2)
x = centroid(z)

rsdepth documentation built on April 25, 2022, 5:05 p.m.

Related to centroid in rsdepth...