how_robust: Quick method to see how robust a list of ID codes is to...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/howrobust.R

Description

Given a list (or matrix) of generated numeric ID codes, this function does a crosswise comparison. It compares the 'Hamming distance' between every pair of given ID sequences, then returns a contingency table with the frequency of Hamming distances found. These Hamming distances represent how robust the coding scheme is to erasure errors. If a particular robustness to erasure is desired, there should be no distances equal to or lower than that robustness.

Usage

1

Arguments

codes

a list of numeric ID sequences generated by rs_IDs, brute_IDs, or tweaked_IDs. This can be either in matrix or list form.

Value

a named, flattened list that contains a contingency table with the frequency of crosswise Hamming distances

Author(s)

Andrew Burchill, andrew.burchill@asu.edu

References

For information on Hamming distances.

For information on erasure coding.

Burchill, A. T., & Pavlic, T. P. (2019). Dude, where's my mark? Creating robust animal identification schemes informed by communication theory. Animal Behaviour, 154, 203-208. doi:10.1016/j.anbehav.2019.05.013

See Also

how_many.

Examples

1
2
3
4
5
6
7
8
9
 #Let's generate some unique IDs given:
total.length <- 4  #we have four positions to mark,
redundancy <- 2    #we're interested in being robust to two erasures,
alphabet <- 5      #and we currently have five types of color bands in stock

codes <- rs_IDs(total.length, redundancy, alphabet)
 #Given that we specified a robustness of 2,
 #there should be no counts of "dist.2" or lower
how_robust(codes)

rabi documentation built on Dec. 10, 2019, 1:08 a.m.