Type: | Package |
Title: | Generate Color Tag Sequences |
Version: | 1.0 |
Date: | 2019-06-21 |
Author: | Carlos Biagolini-Jr. |
Maintainer: | Carlos Biagolini-Jr.<c.biagolini@gmail.com> |
Description: | Implement a coherent and flexible protocol for animal color tagging. 'GenTag' provides a simple computational routine with low CPU usage to create color sequences for animal tag. First, a single-color tag sequence is created from an algorithm selected by the user, followed by verification of the combination uniqueness. Three methods to produce color tag sequences are provided. Users can modify the main function core to allow a wide range of applications. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
NeedsCompilation: | no |
Packaged: | 2019-06-23 15:15:06 UTC; biago |
Depends: | R (≥ 3.5.0) |
Repository: | CRAN |
Date/Publication: | 2019-06-24 14:20:03 UTC |
Generate Color Tag Sequences
Description
Implement a coherent and flexible protocol for animal color tagging. 'GenTag' provides a simple computational routine with low CPU usage to create color sequences for animal tag. First, a single-color tag sequence is created from an algorithm selected by the user, followed by verification of the combination uniqueness. Three methods to produce color tag sequences are provided. Users can modify the main function core to allow a wide range of applications.
Details
The DESCRIPTION file:
Package: | GenTag |
Type: | Package |
Title: | Generate Color Tag Sequences |
Version: | 1.0 |
Date: | 2019-06-21 |
Author: | Carlos Biagolini-Jr. |
Maintainer: | Carlos Biagolini-Jr.<c.biagolini@gmail.com> |
Description: | Implement a coherent and flexible protocol for animal color tagging. 'GenTag' provides a simple computational routine with low CPU usage to create color sequences for animal tag. First, a single-color tag sequence is created from an algorithm selected by the user, followed by verification of the combination uniqueness. Three methods to produce color tag sequences are provided. Users can modify the main function core to allow a wide range of applications. |
License: | GPL (>= 2) |
Index of help topics:
GenTag-package Generate Color Tag Sequences allequal All equal tag sequence sample erc Estimates remaining color escode Empty synonym code escombination Empty synonym combination esdataset Empty synonym dataset genseq Color tag combination generator lifexp Life expectancy tag sequence sample pre_used Pre-used combinations combinations scy Summary color year vfrequency Variable frequency tag sequence sample
Implement a coherent and flexible protocol for animal color tagging. 'GenTag' provides a simple computational routine with low CPU usage to create color sequences for animal tag. First, a single-color tag sequence is created from an algorithm selected by the user, followed by verification of the combination uniqueness. Three methods to produce color tag sequences are provided. Users can modify the main function core to allow a wide range of applications.
Author(s)
Carlos Biagolini-Jr.
Maintainer: Carlos Biagolini-Jr.<c.biagolini@gmail.com>
References
Alisauskas & Lindberg (2002). Effects of neckbands on survival and fidelity of White-fronted and Canada geese captured as non-breeding adults. doi: 10.1080/02664760120108575 Broughton (2015). Low incidence of leg and foot injuries in colour-ringed Marsh tits Poecile palustris. doi: 10.1080/03078698.2015.1059610 Burley (1986). Sex-ratio manipulation in color-banded populations of Zebra finches. doi: 10.1111/j.1558-5646.1986.tb05744.x Burley, Krantzberg & Radman (1982). Influence of colour-banding on the conspecific preferences of Zebra finches. doi: 10.1016/S0003-3472(82)80055-9 Calvo & Furness (1992). A review of the use and the effects of marks and devices on birds. doi: 10.1080/03078698.1992.9674036 Cresswell, Lind, Quinn, Minderman & Whitfield, (2007). Ringing or colour-banding does not increase predation mortality in Redshanks Tringa totanus. doi: 10.1111/j.2007.0908-8857.3925.x Cuthill, Hunt, Cleary, & Clark (1997). Colour bands, dominance, and body mass regulation in male Zebra finches (Taeniopygia guttata). doi: 10.1098/rspb.1997.0151 Fiske & Amundsen (1997). Female bluethroats prefer males with symmetric colour bands. doi: 10.1006/anbe.1996.0436 Gil, Graves, Hazon, & Wells, (1999). Male attractiveness and differential testosterone investment in Zebra finch eggs. doi: 10.1126/science.286.5437.126 Griesser, Schneider, Collis, Overs, Guppy, Guppy, Takeuchi, Collins, Peters & Hall (2012). Causes of ring-related leg injuries in birds - evidence and recommendations from four field studies. doi: 10.1371/journal.pone.0051891 Jennions (1998). The effect of leg band symmetry on female-male association in Zebra finches. doi: 10.1006/anbe.1997.0579 Johnsen, Fiske, Amundsen, Lifjeld, & Rohde (2000). Colour bands, mate choice and paternity in the Bluethroat. doi: 10.1006/anbe.1999.1274 Johnsen, Lifjeld, & Rohde (1997). Coloured leg bands affect male mate-guarding behaviour in the Bluethroat. doi: 10.1006/anbe.1996.0437 Johnson, Dalton & Burley (1993). Preferences of female American goldfinches (Carduelis tristis) for natural and artificial male traits. doi: 10.1093/beheco/4.2.138 Kosinski (2004). The removal of colour rings by Greenfinches Carduelis chloris. doi: 10.1080/03078698.2004.9674304 McCrea & Morgan (2014). Analysis of capture-recapture data. Boca Raton, Chapman and Hall/CRC. Nietmann & Ha (2018). Site-specific incidence of ring-related injuries in Rufous fantails Rhipidura rufifrons. doi: 10.1080/03078698.2018.1505109 Pierce, Stevens, Mulder & Salewski (2007). Plastic colour rings and the incidence of leg injury in Flycatchers (Muscicapidae, Monarchidae). doi: 10.1080/03078698.2007.9674365 Schlich & Kempenaers (2018). The immediate impact of ringing, blood sampling and PIT-tag implanting on the behaviour of Blue tits Cyanistes caeruleus. doi: 10.5253/arde.v106i1.a8 Sedgwick & Klus (1997). Injury due to leg bands in Willow flycatchers. Song, Liu, Booksmythe & Ding (2017). Effects of individual-based preferences for colour-banded mates on sex allocation in Zebra finches. doi: 10.1093/beheco/arx069 Sutherland (2006). Ecological census techniques: a handbook (2nd ed.). New York, Cambridge University Press. Weiser et al (2018). Effects of leg flags on nest survival of four species of Arctic-breeding shorebirds. doi: 10.1111/jofo.12264 Zann (1994). Effects of band color on survivorship, body condition and reproductive effort of free-living Australian Zebra finches. doi: 10.2307/4088512
Examples
genseq(30, 4,c("Black","Blue","Brown","Gray","Green"))
All equal tag sequence sample
Description
Create combinations with equal sample probability to all colors.
Usage
allequal(ntag, colorsname, nspecial = 0, name1 = "Metal", name2 = "EMPTY", location1 = 1,
location2 = 2, nspecial1 = 1, nspecial2 = 1)
Arguments
ntag |
Number of tag to be used in each animal. |
colorsname |
Names/Code of color tags to be sample. |
nspecial |
Number of special tags/codes, such as metallic, "EMPTY", or flag (min 0, max 2). |
name1 |
Name of special tag 1. |
name2 |
Name of special tag 2. |
location1 |
Position (or group of positions) to special band 1. |
location2 |
Position (or group of positions) to special band 2. |
nspecial1 |
Number of special tag 1 that will be present in all sequences genetated. |
nspecial2 |
Number of special tag 2 that will be present in all sequences genetated. |
Value
A sequencie of tags
Author(s)
Biagolini-Jr.
See Also
genseq vfrequency lifexp
Examples
# Create an object contain the name/code of tag colors
tcol<-c("Black","Blue","Brown","Gray","Green","Pink","Purple","Red","White","Yellow")
# Generate color tag combination without especial tags
genseq(30, 4, colorsname= tcol)
#Generate color tag combination with especial color (ex metallic tag for numeric identification)
genseq(30, 4, tcol, nspecial=1, name1="Metal",location1=c(2,4))
# For ongoing works, use the argument usedcombinations to informe the previus used combinations
data(pre_used) # Data example
genseq(100, 4, tcol, usedcombinations=pre_used[,1:4])
Estimates remaining color
Description
Estimates number of remaining color tags in the field
Usage
erc(usedcombinations, yearusedcombinations, currentyear = NA,
yearsurvival = NA, lifespan = NA, hide_color = NA)
Arguments
usedcombinations |
Pre used combinations |
yearusedcombinations |
The year in which the combination was used. |
currentyear |
Current year. |
yearsurvival |
An estimation of the proportion of animals that survive between years. |
lifespan |
Combinations older the lifespan will be automatically disregard. |
hide_color |
Color(s) to be hide in the estimation of remain colors tags present in nature. |
Value
A estimation of the number of remaining color tags in the field.
Author(s)
Biagolini-Jr.
See Also
scy
Examples
## The function is currently defined as
data(pre_used) # Data example
erc(pre_used[,1:4],pre_used[,5],2019,0.85, hide_color="EMPTY")
Empty synonym code
Description
Find synonyms in a group of colors with code for empty tag.
Usage
escode(row_under_review, emptyname = NA, columns_set = NA)
Arguments
row_under_review |
Color sequence to be analyzed. |
emptyname |
Code used to define empty code. |
columns_set |
Range of codes which belong to the same tag region. |
Value
Matrix with all synonym
Examples
# Example of a full sequence
combination<- c("EMPTY","Red","Yellow","Red","Blue","Green")
# See synonym for the code group 1 to 3
escode(combination,"EMPTY",columns_set=1:3)
Empty synonym combination
Description
Find synonyms of a sequence with code for empty tag.
Usage
escombination(row_under_review, emptyname,
g1 = NA, g2 = NA, g3 = NA, g4 = NA, g5 = NA, g6 = NA)
Arguments
row_under_review |
Color sequence to be analyzed. |
emptyname |
Code used to define empty code. |
g1 |
Group of tags from group 1. |
g2 |
Group of tags from group 2. |
g3 |
Group of tags from group 3. |
g4 |
Group of tags from group 4. |
g5 |
Group of tags from group 5. |
g6 |
Group of tags from group 6. |
Value
Matrix with all synonyms
Author(s)
Biagolini-Jr
See Also
escode esdataset
Examples
# Example of a full sequence
combination<- c("EMPTY","Red","Yellow","Red","Blue","Green") # See synonym for the full sequence
escombination(combination,"EMPTY",g1=1:3,g2=4:6)
Empty synonym dataset
Description
Find synonyms in a dataset contain combination with code for empty tag.
Usage
esdataset(tag_sheet, emptyname, g1 = NA, g2 = NA, g3 = NA, g4 = NA, g5 = NA, g6 = NA)
Arguments
tag_sheet |
Dataset contain sequences to be analyzed. |
emptyname |
Code used to define empty code. |
g1 |
Group of tags from group 1. For example, in a code of 6 colors for bird tag, tags from 1 to 3 belongs to the left leg, and tags from 1 to 3 belongs to the right. g1 must to address the left leg, and g2 must to address right leg. Thus: "g1=1:3" and "g2=4:6". |
g2 |
Group of tags from group 2. For example, in a code of 6 colors for bird tag, tags from 1 to 3 belongs to the left leg, and tags from 1 to 3 belongs to the right. g1 must to address the left leg, and g2 must to address right leg. Thus: "g1=1:3" and "g2=4:6". |
g3 |
Group of tags from group 3. |
g4 |
Group of tags from group 4. |
g5 |
Group of tags from group 5. |
g6 |
Group of tags from group 6. |
Value
Matrix with all synonyms for from entire dataset
Author(s)
Biagolini-Jr.
See Also
escode escombination
Examples
(combination<- matrix(c("EMPTY","Red","Blue","Green"),4,6,TRUE)) # Example of a dataset
esdataset(combination,"EMPTY",g1=1:3,g2=4:6)
Color tag combination generator
Description
Create sequences of color tags for animal identification.
Usage
genseq(ncombinations = 100, ntag = 4, colorsname, gen_method = "allequal",
usedcombinations = NA, colorsf = NA, nspecial = 0, name1 = "Metal", name2 = "EMPTY",
location1 = 1, location2 = 2, nspecial1 = 1, nspecial2 = 1, emptyused = FALSE,
emptyname = "EMPTY", currentyear = NA, yearsurvival = 1, lifespan = NA, iotf = FALSE,
yearusedcombinations = NA, speed = 1, ignorecolor = NA,
g1 = NA, g2 = NA, g3 = NA, g4 = NA, g5 = NA, g6 = NA, parameterslist = NA)
Arguments
ncombinations |
Number of combinations to be generated. |
ntag |
Number of tag to be used in each animal. |
colorsname |
Names/Code of color tags to be sample. |
gen_method |
method used for sample colors for tag sequence. |
usedcombinations |
Pre used combinations. |
colorsf |
Frequencies/ratio for color sample. |
nspecial |
Number of special tags/codes, such as metallic, "EMPTY", or flag (min 0, max 2). |
name1 |
Name of special tag 1. |
name2 |
Name of special tag 2. |
location1 |
Position (or group of positions) to special band 1. |
location2 |
Position (or group of positions) to special band 2. |
nspecial1 |
Number of special tag 1 that will be present in all sequences genetated. |
nspecial2 |
Number of special tag 2 that will be present in all sequences genetated. |
emptyused |
If pre-used combination has code for empty set as TRUE, otherwise FALSE |
emptyname |
Code used to define empty code. |
currentyear |
Current year. |
yearsurvival |
An estimation of the proportion of animals that survive between years. |
lifespan |
Combinations older the lifespan will be automatically disregard. |
iotf |
Ignore older than lifespan. If TRUE ignore pre-used combinations older than lifespan |
yearusedcombinations |
The year in which the combination was used. |
speed |
Speed for color frequency adjustment. |
ignorecolor |
Color to be ignored on lifexp. |
g1 |
Group of tags from group 1. For example, in a code of 6 colors for bird tag, tags from 1 to 3 belongs to the left leg, and tags from 1 to 3 belongs to the right. g1 must to address the left leg, and g2 must to address right leg. Thus: "g1=1:3" and "g2=4:6". |
g2 |
Group of tags from group 2. For example, in a code of 6 colors for bird tag, tags from 1 to 3 belongs to the left leg, and tags from 1 to 3 belongs to the right. g1 must to address the left leg, and g2 must to address right leg. Thus: "g1=1:3" and "g2=4:6". |
g3 |
Group of tags from group 3. |
g4 |
Group of tags from group 4. |
g5 |
Group of tags from group 5. |
g6 |
Group of tags from group 6. |
parameterslist |
parameters for methods not provide by 'GenTag' |
Value
A list of combinations
Author(s)
Biagolini-Jr.
See Also
allequal vfrequency lifexp
Examples
# Create an object contain the name/code of tag colors
tcol<-c("Black","Blue","Brown","Gray","Green","Pink","Purple","Red","White","Yellow")
# Generate color tag combination without especial tags
genseq(30, 4, colorsname= tcol)
#Generate color tag combination with especial color (ex metallic tag for numeric identification)
genseq(30, 4, tcol, nspecial=1, name1="Metal", location1=c(2,4))
# For ongoing works, use the argument usedcombinations to informe the previus used combinations
data(pre_used) # Data example
genseq(30, 4, colorsname= tcol, usedcombinations=pre_used[,1:4])
combinations<-genseq(100, 4, tcol) # save combinations into an object
Life expectancy tag sequence sample
Description
Create combinations with variable sample probability.
Usage
lifexp(ntag, colorsname, nspecial = 0, name1 = "Metal", name2 = "EMPTY",
location1 = 1, location2 = 2, nspecial1 = 1, nspecial2 = 1, currentyear = NA,
yearsurvival = 1, lifespan = NA, yearusedcombinations,
usedcombinations, speed = 1, ignorecolor = NA)
Arguments
ntag |
Number of tag to be used in each animal. |
colorsname |
Names/Code of color tags to be sample. |
nspecial |
Number of special tags/codes, such as metallic, "EMPTY", or flag (min 0, max 2). |
name1 |
Name of special tag 1. |
name2 |
Name of special tag 2. |
location1 |
Position (or group of positions) to special band 1. |
location2 |
Position (or group of positions) to special band 2. |
nspecial1 |
Number of special tag 1 that will be present in all sequences genetated. |
nspecial2 |
Number of special tag 2 that will be present in all sequences genetated. |
currentyear |
Current year. |
yearsurvival |
An estimation of the proportion of animals that survive between years. |
lifespan |
Combinations older the lifespan will be automatically disregard. |
yearusedcombinations |
The year in which the combination was used. |
usedcombinations |
Pre used combinations. |
speed |
Speed for color frequency adjustment. |
ignorecolor |
Color to be ignored on lifexp. |
Value
A sequencie of tags
Author(s)
Biagolini-Jr.
See Also
allequal genseq vfrequency
Examples
data(pre_used) # Data example
# Create an object contain the name/code of tag colors
tcol<-c("Black","Blue","Brown","Gray","Green","Pink","Purple","Red","White","Yellow")
genseq(30, 4,tcol, "lifexp", pre_used[,1:4],
yearusedcombinations=pre_used[,5], yearsurvival= 0.8, lifespan=5, currentyear=2019)
Pre-used combinations combinations
Description
Simulated data of pre-used combinations
Usage
data("pre_used")
Format
A data frame with 1200 observations on the following 5 variables.
Tag_1
a factor with levels
Black
Brown
Dark_Blue
EMPTY
Gray
Green
Light_Blue
Orange
Pink
Red
White
Yellow
Tag_2
a factor with levels
Black
Brown
Dark_Blue
Gray
Green
Light_Blue
Metal
Orange
Pink
Red
White
Yellow
Tag_3
a factor with levels
Black
Brown
Dark_Blue
EMPTY
Gray
Green
Light_Blue
Orange
Pink
Red
White
Yellow
Tag_4
a factor with levels
Black
Brown
Dark_Blue
Gray
Green
Light_Blue
Metal
Orange
Pink
Red
White
Yellow
Year
a numeric vector
Details
Simulated database to example of registers of color tag sequences usage. Columns 1, 2 ,3 and 4 represent the tag code, and column 5 is the date of tagging.
Source
Simulated database
Examples
data(pre_used)
Summary color year
Description
Summary the number of each color tag used per year.
Usage
scy(usedcombinations, yearusedcombinations, hide_color = NA)
Arguments
usedcombinations |
Pre used combinations. |
yearusedcombinations |
The year in which the combination was used. |
hide_color |
Color(s) to be hide in the estimation of remain colors tags present in nature. |
Value
A summary of the numeber of tag colors used by year
Author(s)
Biagolini-Jr.
See Also
erc
Examples
data(pre_used) # Data example
scy(pre_used[,1:4],pre_used[,5], hide_color="EMPTY")
Variable frequency tag sequence sample
Description
Create combinations with defined sample probability to each colors.
Usage
vfrequency(ntag, colorsname, colorsf, nspecial = 0, name1 = "Metal",
name2 = "EMPTY", location1 = 1, location2 = 2, nspecial1 = 1, nspecial2 = 1)
Arguments
ntag |
Number of tag to be used in each animal. |
colorsname |
Names/Code of color tags to be sample. |
colorsf |
Frequencies/ratio for color sample. |
nspecial |
Number of special tags/codes, such as metallic, "EMPTY", or flag (min 0, max 2). |
name1 |
Name of special tag 1. |
name2 |
Name of special tag 2. |
location1 |
Position (or group of positions) to special band 1. |
location2 |
Position (or group of positions) to special band 2. |
nspecial1 |
Number of special tag 1 that will be present in all sequences genetated. |
nspecial2 |
Number of special tag 2 that will be present in all sequences genetated. |
Value
A sequencie of tags
Author(s)
Biagolini-Jr
See Also
allequal genseq lifexp
Examples
tcol<-c("Black","Blue","Brown","Gray","Green","Pink","Purple","Red","White","Yellow")
p<-c(1,2,5,1,2,2,4,5,8,5)
genseq(30, 4, tcol, gen_method="vfrequency", colorsf=p)