MyNixOS website logo
Description

Generate Codes to Uniquely and Robustly Identify Individuals for Animal Behavior Studies.

Facilitates the design and generation of optimal color (or symbol) codes that can be used to mark and identify individual animals. These codes are made such that the IDs are robust to partial erasure: even if sections of the code are lost, the entire identity of the animal can be reconstructed. Thus, animal subjects are not confused and no ambiguity is introduced.

rabi

CRAN_Status_Badge

The goal of rabi is to facilitate the design and generation of color (or symbol) codes that can be used to mark and identify individual animals (specifically aimed for research projects). These codes can be selected such that the IDs are robust to partial erasure: even if parts of the code are lost, the entire identity of the animal can be reconstructed Thus, animal subjects are not confused and no ambiguity is introduced.

Installation

You can install rabi from CRAN with:

install.packages("rabi")

You can also install rabi from Github with:

# install.packages("devtools")
devtools::install_github("andburch/rabi")

Example

Although these methods and principles are applicable across taxa and situations, we will demonstrate their usefulness on ants as an illustration. A well-thought-out identification system is important in social insect research because colonies are often composed of hundreds to thousands of virtually identical workers. Additionally, their tendency to groom themselves (and each other) creates a situation where markings are especially susceptible to becoming detached and disrupting identification.

Let’s say we have 100 ants we need to track and observe: we need to always know their individual identities. We have five colors of paint which we will apply as drops to locations on their backs. Their heads and thoraxes will each receive a colored drop and then they will get two drops on their abdomens (i.e. gasters). We want a coding scheme that will still perfectly identify the ants even if they all lose one of these marks.

total.length <- 4  #we have four places to put paint,
redundancy <- 1    #we want robustness to single erasures,
alphabet <- 5      #and we currently have five types of paint in stock
 #rs_IDs() is one of the functions that can generate codes
codes <- rabi::rs_IDs(total.length, redundancy, alphabet)
 #prep the output to be displayed in a table
codes <- t(do.call("cbind",codes))
knitr::kable(
  head(codes, n = 10L), 
  col.names = c("Head","Thorax","R. Abdomen","L. Abdomen"), 
  align = "c", caption = "ID sequences for ants")
HeadThoraxR. AbdomenL. Abdomen
0000
1111
2222
3333
4444
0123
1234
2340
3401
4012

ID sequences for ants

We can easily add our paint color names to the output as well. (However, I would personally save the mapping for future reference, etc.)

paint.names <- c("red","light blue", "greenish", "off-white", "yellow")
color.codes <- rabi::codes_to_colors(codes, paint.names)
 #prep the output to be displayed in a table
color.codes <- t(do.call("cbind",color.codes))
knitr::kable(
  head(color.codes, n = 10L), 
  col.names = c("Head","Thorax","R. Abdomen","L. Abdomen"), 
  align = "c", caption = "ID paint sequences for ants")
HeadThoraxR. AbdomenL. Abdomen
redredredred
light bluelight bluelight bluelight blue
greenishgreenishgreenishgreenish
off-whiteoff-whiteoff-whiteoff-white
yellowyellowyellowyellow
redlight bluegreenishoff-white
light bluegreenishoff-whiteyellow
greenishoff-whiteyellowred
off-whiteyellowredlight blue
yellowredlight bluegreenish

ID paint sequences for ants

#> Note: The mapping (see below) that was used to assign color names to numeric values is not saved or assigned to a variable. 
#>  The exact mapping may change with repeated function calls. Depending on your circumstances, you may want to record this now.

#>            0            1            2            3            4 
#>        "red" "light blue"   "greenish"  "off-white"     "yellow"

##More For a (possibly buggy) Shiny-based GUI suited for new R users, try running this command.

rabi::exampleGUI()

For additional functions, deeper examples, and such, check out the vignette on designing color band schemes for bird legs: it’s chock full of cool stuff.

utils::vignette('loosebirdtag', package='rabi')

Lastly, check out our journal article on this subject:

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

Metadata

Version

1.0.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows