Skip to contents

Dispatches by survey_type to avoid false-positive warnings on aerial and camera designs that do not collect interview data.

Usage

check_completeness(design, n_min = 10L)

Arguments

design

A creel_design object with counts (and optionally interviews) attached.

n_min

Integer scalar >= 1. Interview threshold below which a stratum is flagged as low-n. Default 10L.

Value

A creel_completeness_report object (S3 list) with:

$missing_days

data.frame of calendar rows with no count data

$low_n_strata

data.frame of strata below n_min, or NULL for aerial/camera

$refusals

creel_summary_refusals object or NULL

$n_min

integer threshold used

$survey_type

character

$passed

logical – TRUE if no missing days and no low-n strata

Examples

data(example_calendar)
data(example_counts)
data(example_interviews)
design <- creel_design(example_calendar, date = date, strata = day_type)
design <- add_counts(design, example_counts)
#> Warning: No weights or probabilities supplied, assuming equal probability
design <- add_interviews(design, example_interviews,
  catch = catch_total, effort = hours_fished, harvest = catch_kept,
  trip_status = trip_status
)
#> Warning: ! No `n_anglers` provided — assuming 1 angler per interview.
#>  Pass `n_anglers = <column>` to use actual party sizes for angler-hour
#>   normalization.
#>  If the interviews really are one angler each, pass `n_anglers = 1` to state
#>   that and silence this warning.
#>  Added 22 interviews: 17 complete (77%), 5 incomplete (23%)
check_completeness(design)
#> 
#> ── Completeness Report ─────────────────────────────────────────────────────────
#> Survey type: instantaneous | n_min threshold: 10
#>  Completeness issues found
#> 
#> 
#> ── Missing Days ──
#> 
#>  No missing sampling days
#> 
#> ── Low-n Strata (threshold: 10) ──
#> 
#> ! 1 stratum/strata below n_min=10
#> 
#> ── Refusal Rates ──
#> 
#> (not recorded or not applicable)