Calculate diversity in given sets of individuals
ts_diversity( ts, sample_sets, mode = c("site", "branch", "node"), windows = NULL, span_normalise = TRUE )
A list (optionally a named list) of character vectors with individual names (one vector per set)
The mode for the calculation ("sites" or "branch")
Coordinates of breakpoints between windows. The first
coordinate (0) and the last coordinate (equal to
Divide the result by the span of the window? Default TRUE, see the tskit documentation for more detail.
For each set of individuals either a single diversity value or a vector of diversity values (one for each window)