simple_IDs {rabi} | R Documentation |
Simple color coding scheme generator
Description
Creates a simple color (or symbol) coding scheme used to mark and identify individual animals. The sum of each IDs numeric sequence is a multiple of the number of colors used in the scheme. Even if one marking is removed, the entire ID code can be reconstructed.
Usage
simple_IDs(total.length, alphabet, available.colors = NULL)
Arguments
total.length |
the number of unique positions to be marked on the animal. (This can be thought of as the total number of positions on which color bands or paint marks will be applied.) |
alphabet |
an integer representing the 'alphabet size.' This is the number of unique markings (think different paint colors, symbols, or varieties of bands) at your disposal. |
available.colors |
an optional list of strings that contains the names of the unique markings which compose the given 'alphabet' (e.g. "blue", "red", "yellow", etc.). If left blank, the mapping can be done at any later time using |
Value
a list containing the maximum possible number of unique ID codes that fit the provided parameters.
If an appropriate argument for available.colors
is provided, each code will be a sequence of strings, otherwise, each code will be a sequence of numeric values.
Author(s)
Andrew Burchill, andrew.burchill@asu.edu
References
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
Examples
total.length <- 4 #we have four positions to mark
alphabet <- 5 #and we currently have five types of paint in stock
#Generate codes where the sum of the sequence is a multiple of five
simple_IDs(total.length, alphabet)
#Let's make those into human-readable color sequences
color.names <- c("blue","red","green","pink","cyan")
simple_IDs(total.length, alphabet, available.colors = color.names)