pairdist: Calculate pairwise distances between nodes

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Returns a symmetric matrix containing the pairwise distances between all nodes, or possibly the pairwise distances between tips only.

Usage

1
  pairdist(phy, type=c("all", "tip"), use.labels=FALSE)

Arguments

phy

A phylo4 object (or one that inherits from it).

type

Should pairwise distances be returned for "all" nodes (default), or only for "tip" nodes?

use.labels

(logical) If FALSE, row and column names are the numeric node IDs, otherwise labels will be used (possibly resulting in NA names in the case of missing node labels).

Details

TODO

Value

Numeric matrix of distances, with either node IDs or node labels as row and column names.

Author(s)

Jim Regetz (regetz@nceas.ucsb.edu)

See Also

ape package functions cophenetic and dist.nodes, on which pairdist is based.

Examples

1
2
3
4
5
  # all pairwise distances
  pairdist(weeds)

  # pairwise distances between tips, with labels and dim names
  pairdist(weeds, type="tip", use.labels=TRUE)

eliotmiller/ecoPDcorr documentation built on May 16, 2019, 3:02 a.m.