localoptima: Function to Find Local Optimization for clustering

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/localoptima.R

Description

A function meant to be used internally be the relational.clustering function

Usage

1

Arguments

dist

Distance matrix to be used

group

group designations

Details

The function takes a distance matrix and a vector with the group identifications for each sample locality (or equivalent). It is mainly meant to be used internally by the relational.clustering function to optimize the initial clustering and find the local (which hopefully is also the global) optimal organization, such that each member of a group is more similar to the other members in it's group (on average) than to any other groups.

Value

Arc distance between two points on the Earth's surface in kilometers.

Note

The distance calculated may be up to 0.2% inaccurate, as this function treats the Earth as a sphere with a circumference of 40003 km, rather than an ellipsoid like it actually is.

Author(s)

Matthew Vavrek

See Also

To calculate pairwise distances between a list of points see earth.dist, or to calculate an area enclosed by three points on the Earth's surface, see earth.tri

Examples

1
2
##distance between 23 degrees N 54 degrees E and 32 degrees S 67 degrees E
deg.dist(23,54,-32,67)

Example output

Loading required package: sp
Loading required package: maps
Loading required package: shapefiles
Loading required package: foreign

Attaching package: 'shapefiles'

The following objects are masked from 'package:foreign':

    read.dbf, write.dbf

[1] 3201.619

fossil documentation built on March 23, 2020, 5:06 p.m.