Converts a (distance) matrix
to a data.frame
.
matrix_to_df(x, all = FALSE)
a matrix
.
a logical
value. If TRUE
(default), keep cells with NA
.
A data.frame
with the following three columns: from
(the
first site), to
(the second site) and distance
(the value of the link
between two sites).
# Add an example ----