# 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
)
Run the code above in your browser using DataLab