Learn R Programming

dialectR (version 1.0)

distmat_to_df: Convert a dialectometric distance matrix to a dataframe

Description

Input a distance matrix, with which a dataframe will be returned with the three columns of "row", "col", and "dist". The first two correspond with the rows and columns in the distance matrix, and the last refers to their crossing point, where the distance between them is given.

Usage

distmat_to_df(dist_matrix)

Arguments

dist_matrix

A distance matrix.

Value

A dataframe with the columns "row", "col", and "dist".

Examples

Run this code
# NOT RUN {
# Example 1: Dutch distance matrix to Dutch dataframe
data(distDutch)
distmat_to_df(distDutch)
# }

Run the code above in your browser using DataLab