Learn R Programming

habtools (version 1.1.1)

centroid: Calculate the centroid of 3D points

Description

Calculates the centroid for a given set of XYZ coordinates.

Usage

centroid(data)

Value

The coordinates of the centroid.

Arguments

data

A data frame with x, y, and z coordinates.

Examples

Run this code
data <- mesh_to_points(mcap)
centroid(data)

Run the code above in your browser using DataLab