# an occurrence-based example
# needed data
data(stages)
data(corals)
# calculate diversites
dd <-divDyn(corals, tax="genus", bin="stg")
# plot range-through diversities
tsplot(stages, xlim=51:94, ylim=c(0,250), boxes="sys")
tsbars(x=stages$mid, y=dd$divRT, width=stages$dur, gap=1, col=stages$col)
Run the code above in your browser using DataLab