df2distance: Convert Three-column Data to Distance Matrix
Description
This function converts a data frame with three columns (from, to, count) into a distance matrix.
The rows and columns of the matrix are all unique names from the 'from' and 'to' columns,
and the matrix values are filled with counts.
Usage
df2distance(data)
Value
A distance matrix where rows and columns are all unique names from 'from' and 'to' columns.
Arguments
data
A data frame containing three columns: from, to, count.