ACL: ACL weights

View source: R/weights.R

ACLR Documentation

ACL weights

Description

Calculates phylogenetic weights (a.k.a. phylogenetic means) according to the classic method of Altschul, Carroll & Lipman (1987).

Usage

ACL(phy)

Arguments

phy

A phylo object.

Value

A vector of weights.

Examples


library(ape)

# Three trees, representing three genealogical hypotheses, that relate
# languages A,B,C,D:
tree1 <- read.tree(text = "(((A:1,B:1,C:1):1,D:2):0.3);")
plot(tree1)
tree2 <- read.tree(text = "(((A:0.2,B:0.2,C:0.2):1.8,D:2):0.3);")
plot(tree2)
tree3 <- read.tree(text = "(((A:1.8,B:1.8,C:1.8):0.2,D:2):0.3);")
plot(tree2)
# The ACL weights of each language in each tree:
ACL(tree1)
ACL(tree2)
ACL(tree3)

erichround/phyloWeights documentation built on Sept. 29, 2023, 9:49 a.m.