
Linear area rebinning of frequency data
rebin_counts.RdRedistributes counts from source bins to destination bins using proportional overlap. For each destination bin, the function finds all source bins that overlap it and assigns a fraction of each source bin's count proportional to the overlap width relative to the source bin width.
Arguments
- src_edges
numeric vector (length N+1). Boundaries of source bins. Must be monotonically increasing.
- src_counts
numeric vector (length N). Counts in each source bin. May be an AD vector from RTMB.
- dest_edges
numeric vector (length M+1). Boundaries of destination bins. Must be monotonically increasing.