dist_fns {metasnf}R Documentation

Built-in distance functions

Description

These functions can be used when building a metasnf distance functions list. Each function converts a data frame into to a distance matrix.

Usage

euclidean_distance(df, weights_row)

gower_distance(df, weights_row)

sn_euclidean_distance(df, weights_row)

sew_euclidean_distance(df, weights_row)

hamming_distance(df, weights_row)

Arguments

df

Data frame containing at least 1 data column

weights_row

Single-row data frame where the column names contain the column names in df and the row contains the corresponding weights_row.

Details

Functions that work for numeric data:

Functions that work for binary data:

Functions that work for any type of data:

Value

A matrix class object containing pairwise distances.


[Package metasnf version 2.1.2 Index]