read.dist: Read a distance matrix from a file or data frame.

Description Usage Arguments Value Examples

View source: R/dists.R

Description

Read a distance matrix from a file or data frame.

Usage

1
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

1
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))

kevinstadler/cultevo documentation built on June 29, 2017, 8 p.m.