read.dist {cultevo}R Documentation

Read a distance matrix from a file or data frame.

Description

Read a distance matrix from a file or data frame.

Usage

read.dist(data, el1.column = 1, el2.column = 2, dist.columns = 3)

Arguments

data

a filename, data frame or matrix

el1.column

the column name or id specifying the first element

el2.column

the column name or id specifying the second element

dist.columns

the column name(s) or id(s) specifying the distance(s) between the two corresponding elements

Value

a distance matrix (or list of distance matrixes when there is more than one dist.columns) of type matrix

Examples

read.dist(cbind(c(1,1,1,2,2,3), c(2,3,4,3,4,4), 1:6, 6:1), dist.columns=c(3,4))

[Package cultevo version 1.0.2 Index]