check_nest: Check records in litter and juvenile tables

Description Usage Arguments Value Checks Examples

View source: R/check-nest.r

Description

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.

Usage

 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)

Arguments

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.

Value

A data frame of records that failed the checks.

Checks

The following checks have been implemented:

Examples

 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)

mstrimas/krsp documentation built on May 23, 2019, 8:16 a.m.