Widen the smoothing window of one sample for smooth_method = "grim"
in smooth_community_data(). In each step, the window is widened by
one sample at the lower end and then by one sample at the upper end,
each only while the window stays within the sequence, spans less than
smooth_age_range years, and has at most smooth_n_max samples.
Usage
util_search_parameter(
A,
B,
smooth_age_range,
smooth_n_max,
smooth_n_points,
dat_age,
dat_community
)Arguments
- A
numeric. Index of the first sample of the starting window.- B
numeric. Index of the last sample of the starting window.- smooth_age_range
numeric. The age span of the window (difference between the ages of its first and last sample) must stay below this value.- smooth_n_max
numeric. Maximum number of samples in the window.- smooth_n_points
numeric. Number of samples of the starting window; the window is widened insmooth_n_max - smooth_n_pointssteps.- dat_age
data.framewith a columnage, one row per sample.- dat_community
data.framewith one row per sample; only its number of rows is used.
Details
The arguments are not checked here: the only caller,
smooth_community_data(), checks them before it calls this helper for
each sample.
