# Simple example
DKI(AMBI = 1.61, H = 2.36, N = 25, S = 6)
# ------ Example workflow for calculating DKI from species counts ----
# calculate AMBI index
dfAMBI <- AMBI(test_data, by = c("station"), var_rep="replicate")[["AMBI"]]
# show AMBI results
dfAMBI
# calculate DKI from AMBI results
dplyr::mutate(dfAMBI, DKI = DKI(AMBI, H, N, S))
Run the code above in your browser using DataLab