Aggregates species abundance data by temporal resolution, computing mean and standard error for visualization in time series plots. Uses dbplyr lazy evaluation for efficient database queries.
Value
data.frame with columns:
time- aggregated time valuename- species nameavg- mean standardized tallystd- standard error (sd/n)n- number of observationsupr- upper confidence bound (avg + std)lwr- lower confidence bound (avg - std)
Details
For seasonal plots (ts_res = "quarter"), the function adds a wrapping
row to ensure visual continuity across the year boundary. Data is collected
from database before aggregation.
See also
expr_time_sp for temporal transformation logic
plot_ts for visualization