Description Usage Arguments Value Checks Examples
Perform data integrity checks on the nest tables: litter and juvenile. Run
all checks at once with check_nest()
, or perform individual checks
with the specific functions outlined below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | check_nest(con, grid, year)
check_nest_loc(con, grid, year)
check_nest_n1loc(con, grid, year)
check_nest_n2loc(con, grid, year)
check_nest_weight(con, grid, year)
check_nest_dna(con, grid, year)
check_nest_notch(con, grid, year)
check_nest_grid(con, grid, year)
|
con |
Connection to KRSP database |
grid |
character; one or more grids to search. Defaults to all grids. |
year |
integer; one or more years to search within. Defaults to all years. |
A data frame of records that failed the checks.
The following checks have been implemented:
check_nest_loc
: the locs in the litter table should be
reflos for the mother's midden, e.g. A.5, 22.0, or -1.5, and not the
locations of the nests.
check_nest_n1loc
: all locs should conform to the standard
format, e.g. A.1, 22.1, or -1.8.
check_nest_n2loc
: all locs should conform to the standard
format, e.g. A.1, 22.1, or -1.8.
check_nest_dna
: DNA vial numbers should be composed of
the grid, followed by the 2 digit year, then 4 numbers, e.g. KL151234.
In addition, all juveniles should have 2 DNA vials, unless one of the
nests was missed or the squirrel wasn't present at nest 2.
check_nest_weight
: highlight records with suspicious nest 1 or
nest 2 weights. In general, nest 1s should be between 7 and 25 grams
and nest 2s between 30 and 80 grams. Flagged juveniles may result from an
error or a late nest.
check_nest_notch
: within a litter no two squirrels of the same
sex should have the same notch combination.
check_nest_grid
: the grid associated with a litter should
match the mother's grid. Mis-matches can occur if the iPod used to enter
the litter is set to the wrong grid.
1 2 3 4 5 6 7 8 9 10 11 12 | con <- krsp_connect()
# run individual checks
check_nest_loc(con, grid = "AG")
check_nest_n1loc(con, year = 2012)
check_nest_n2loc(con, year = 2012)
check_nest_dna(con, year = 2015)
check_nest_weight(con, year = 2015)
check_nest_notch(con, year = 2014)
check_nest_grid(con, year = 2006)
# or perform them all at once
check_nest(con, year = 2012) %>%
count(check)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.