Learn R Programming

BioTrajectory (version 1.1.0)

centroid: 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)

Value

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

Arguments

obj

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