Randomly select transects by locality until a target sampled area is reached
timefish_select_transects_by_area.RdThis helper applies balanced random transect selection across sites within
each locality, using a common target area (usually the minimum comparable
area estimated with timefish_minimum_sampling_area()).
Usage
timefish_select_transects_by_area(
data,
area_col,
transect_id_col,
site_col,
location_col,
target_area = NULL,
seed = NULL
)Arguments
- data
A data frame with sampling records.
- area_col
Column name with transect area values.
- transect_id_col
Column name with the unique transect identifier.
- site_col
Column name for site.
- location_col
Column name for locality.
- target_area
Optional numeric target area. If
NULL, the function uses the minimum area estimated bytimefish_minimum_sampling_area().- seed
Optional integer seed for reproducible random selection.
Examples
sel <- timefish_select_transects_by_area(
data = timefish_location(),
area_col = "sampling_area_m2",
transect_id_col = "transect_id",
site_col = "site",
location_col = "location"
)