Learn R Programming

GeoModels (version 2.1.6)

CheckDistance: Checking Distance Type

Description

Checks the validity and type of the specified distance.

Usage

CheckDistance(distance)

Value

An integer:

  • 0 for Euclidean distance

  • 1 for Geodesic distance

  • 2 for Chordal distance

If the input is not recognized, the function returns NULL.

Arguments

distance

A character string indicating the type of distance. Available options are: "Eucl" (Euclidean), "Geod" (Geodesic), and "Chor" (Chordal). See also GeoCovmatrix.

Details

This function checks whether the specified distance type is valid.