Learn R Programming

overlapptest (version 1.4)

centroidiam: Compute Centroids and Diameters

Description

Computes the centroid and diameter of each individual polygon in a multi-polygon owin object.

Usage

centroidiam(ventana1)

Value

diams

Vector of diameters

centroids

Matrix with the coordinates of the centroids

Arguments

ventana1

A multiple-polygon window with the format owin of spatstat

Author

Marcelino de la Cruz Rot

Details

Iteratively applies the functions centroid.owin and diameter of spatstat to each polygon in the multipolygon owin and computes its centroid and its diameter.

Examples

Run this code
data(Astragalus)
X<-centroidiam(Astragalus)
X$centroids
X$diams

Run the code above in your browser using DataLab