bin_character_completeness: Phylogenetic character completeness in time-bins

Description Usage Arguments Details Value Author(s) Examples

View source: R/bin_character_completeness.R

Description

Given a cladistic matrix, time-scaled tree, and set of time bin boundaries will return the proportional character completeness in each bin.

Usage

1
2
3
4
5
6
7
bin_character_completeness(
  cladistic_matrix,
  time_tree,
  time_bins,
  plot = FALSE,
  confidence.interval = 0.95
)

Arguments

cladistic_matrix

A cladistic matrix in the form imported by read_nexus_matrix.

time_tree

A time-scaled phylogenetic tree containing all the taxa in cladistic_matrix.

time_bins

A set of time bin boundaries (oldest to youngest) in millions of years.

plot

An optional choice to plot the results (default is FALSE).

confidence.interval

The confidence interval to be used as a proportion (0 to 1). Default is 0.95 (i.e., 95%).

Details

Character completeness metrics have been used as an additional metric for comparing fossil record quality across time, space, and taxa. However, these only usually refer to point samples of fossils in bins, and not our ability to infer information along the branches of a phylogenetic tree.

This function returns the proportional phylogenetic character completeness for a set of time bins.

Value

A list summarising the mean, upper and lower confidence interval, and per character proportional character completeness in each time bin.

Author(s)

Graeme T. Lloyd graemetlloyd@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Create a random tree for the Day et al. 2016 data set:
day_2016tree <- ape::rtree(n = nrow(day_2016$matrix_1$matrix))
day_2016tree$tip.label <- rownames(x = day_2016$matrix_1$matrix)
day_2016tree$root.time <- max(diag(x = ape::vcv(phy = day_2016tree)))

# Get proportional phylogenetic character completeness in ten equal-length
# time bins:
bin_character_completeness(
  cladistic_matrix = day_2016,
  time_tree = day_2016tree, time_bins = seq(
    from =
      day_2016tree$root.time, to = day_2016tree$root.time -
      max(diag(x = ape::vcv(phy = day_2016tree))), length.out = 11
  )
)

# Same, but with a plot:
bin_character_completeness(
  cladistic_matrix = day_2016,
  time_tree = day_2016tree, time_bins = seq(
    from =
      day_2016tree$root.time, to = day_2016tree$root.time -
      max(diag(x = ape::vcv(phy = day_2016tree))), length.out = 11
  ), plot = TRUE
)

Claddis documentation built on Oct. 23, 2020, 8:04 p.m.