centroid: Calculate the Centroid of Object

View source: R/centroid.R

centroidR Documentation

Calculate the Centroid of Object

Description

This function calculates the centroid of a set of points contained in an object of class 'trajectory'. The centroid is the average of the coordinates of all the points.

Usage

centroid(obj)

Arguments

obj

An object of class 'trajectory' that must contain a component named 'points'.

Value

A numeric vector containing the coordinates of the centroid of the points stored in 'obj$points'.


BioTrajectory documentation built on Nov. 26, 2025, 5:07 p.m.