Skip to contents

This 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 by timefish_minimum_sampling_area().

seed

Optional integer seed for reproducible random selection.

Value

A list with target_area, selected_transects, summary_by_location, and sampled_data.

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"
)