Location of Most Recent Common Ancestor

Share:

Description

Function that returns the posterior distribution of the geographic locations of the Most Recent Common Ancestor of a set of tips. A barplot can be generated.

Usage

1
PLD_loc_mrca(x, tips, sub_sample = 0, plot_distrib = FALSE, col = NA)

Arguments

x

an object of class "phyloland" generated by a call to PLD_interface.

tips

a vector of character strings specifying the set of tips.

sub_sample

a vector of integers that specifies the indexes of the trees and locations to take into account. Default is 0, all the trees and locations are considered.

plot_distrib

a logical value, if TRUE a barplot is plotted. The default is FALSE.

col

a set of colors for the barplot.

Value

frequencies

matrix with 3 columns containing location latitudes, longitudes and frequencies.

locationsMRCA

vector containing all the sub_sample sampled locations for the tips Most Recent Common Ancestor.

Examples

1
2
3
data(Banza)
locations = PLD_loc_mrca(x = Banza, tips = Banza$tips, sub_sample = 100:200, plot_distrib = TRUE)
locations$frequencies