res4$dnm[1] not equal to 1.
1/1 mismatches
[1] 2 - 1 == 1

res3 <- freq(tst,"b",total="",denom=10,totaldenom = 20)
res4  <- freq(tst,"b",total="",denom=dnmd,totaldenom = tdnmd)

res4$dnm[nrow(res4)] not equal to 6.
1/1 mismatches
[1] 5 - 6 == -1