# Create a random dataset of 100 changes (between 100 and 0 Ma):
change_times <- stats::runif(n = 100, min = 0, max = 100)
# Create 10 equal-length time bins:
time_bins <- seq(100, 0, length.out = 11)
# Get N changes for each bin:
bin_changes(change_times, time_bins)
Run the code above in your browser using DataLab