piecewiselin: Piecewise linear transformation for distance matrices

View source: R/geodist.R

piecewiselinR Documentation

Piecewise linear transformation for distance matrices

Description

Piecewise linear transformation for distance matrices, utility function for geco.

Usage

piecewiselin(distmatrix, maxdist=0.1*max(distmatrix))

Arguments

distmatrix

symmetric (non-negative) distance matrix.

maxdist

non-negative numeric. Larger distances are transformed to constant 1.

Details

Transforms large distances to 1, 0 to 0 and continuously linear between 0 and maxdist.

Value

A symmetrical matrix.

Author(s)

Christian Hennig christian.hennig@unibo.it https://www.unibo.it/sitoweb/christian.hennig/en

See Also

geco

Examples

options(digits=4)
data(waterdist)
piecewiselin(waterdist)

prabclus documentation built on Sept. 24, 2024, 5:07 p.m.