Learn R Programming

geophys (version 1.3-8)

centroid: centroid

Description

calculate the centroid of a polygon

Usage

centroid(p)

Arguments

p
list: x,y

Value

Details

same code as centroid.polygon

Examples

Run this code

L=list()
L$x=c( 0.2188,-0.6668,-1.0992,-0.5105, 0.5106)
L$y=c( 0.76822, 0.75292,-0.01741,-0.74692,-0.48165)
centroid(L)



Run the code above in your browser using DataLab