Learn R Programming

supc (version 0.2.6.2)

dist.mode: Configure which package is used to compute the distance matrix

Description

Configure which package is used to compute the distance matrix or register one. Note that the speed depends on the data and the hardware.

Usage

dist.mode(mode = c("stats", "amap"), FUN = NULL)

Arguments

mode

string. The available modes are "stats" and "amap" by default.

FUN

a function which has one argument x or NULL. The function should compute the pairwise distance of x and return a dist object. The user can skip this argument if the mode is registered. For example, "stats" and "amap" are registered by default.

Value

NULL. The function is called for side effects.

Examples

Run this code
# NOT RUN {
# use stats::dist to compute the pairwise distance
dist.mode("stats")
# use amap::Dist to compute the pairwise distance
dist.mode("amap")
# }

Run the code above in your browser using DataLab