
Standardize sampled-day effort rows for count-based workflows
Source:R/prep-counts.R
prep_counts_daily_effort.RdConverts a data frame that already contains sampled-day effort estimates into
a canonical tibble for downstream use with add_counts(). This helper is the
preferred seam for count-based workflows where raw within-day count schedules,
section probabilities, boat-party-size adjustments, camera multipliers, or
similar count-side corrections have already been resolved outside the core
estimator.
The returned table always contains canonical columns:
date, any selected strata columns, effort_type, daily_effort, psu,
and correction_factor. Optional columns n_counts, within_day_var, and
source_method are included when supplied.
Usage
prep_counts_daily_effort(
data,
date,
strata = NULL,
effort_type,
daily_effort,
correction_factor = 1,
psu = NULL,
n_counts = NULL,
within_day_var = NULL,
source_method = NULL
)Arguments
- data
A data frame containing sampled-day effort rows.
- date
Tidy selector for the Date column.
- strata
Optional tidy selector for one or more strata columns.
- effort_type
Tidy selector for the effort-type column. Common values are
"bank"and"boat".- daily_effort
Tidy selector for the numeric sampled-day effort column.
- correction_factor
Optional multiplicative correction applied to
daily_effort. May be a scalar (defaults to1) or an expression that evaluates to a numeric vector with one value per row, including a bare column name. Values must be finite and strictly positive.- psu
Optional tidy selector for the PSU column. Defaults to the selected date column when omitted.
- n_counts
Optional tidy selector for the number of within-day counts used to compute the sampled-day estimate.
- within_day_var
Optional tidy selector for a within-day variance or sum of squares column associated with the sampled-day estimate.
- source_method
Optional tidy selector for a column describing how the sampled-day effort estimate was derived (e.g.
"direct_count","boat_count_x_mean_party_size","camera_count_x_detection_correction").
Value
A tibble with canonical sampled-day effort columns. Required columns
are date, selected strata columns (if any), effort_type, daily_effort,
psu, and correction_factor. Optional columns are appended when supplied.
See also
Other "Survey Design":
add_catch(),
add_counts(),
add_interviews(),
add_lengths(),
add_sections(),
as_hybrid_svydesign(),
as_survey_design(),
compute_angler_effort(),
compute_effort(),
creel_design(),
creel_schema(),
est_effort_camera(),
prep_counts_boat_party(),
prep_interview_catch(),
prep_interviews_trips(),
validate_creel_schema()