tropFW: Tropical Fermat-Weber Point

Description Usage Arguments Value Examples

View source: R/tropFW.R

Description

Compute the tropical Fermat-Weber (FW) point for a given data matrix. The FW point minimizes the summed tropical distance to the trees described in the data matrix.

Usage

1
tropFW(x)

Arguments

x

a data matrix, of dimension nobs x nvars; each row is an observation vector.

Value

A list containing:

fw

The fermat-weber point.

distsum

The sum of distance from each observation to the fermat-weber point.

Examples

1
2
x <- matrix(rnorm(100), ncol = 10)
tropFW(x)

Rtropical documentation built on Nov. 10, 2021, 1:07 a.m.