Get weights for WRTDS for a single observation using a tri-cubic weighting function
input tidal object
arguments passed to or from other methods
row of tidal object as reference for weights
chr string of three elements indicating names of columns in tidal object that are used for reference row weights
list of half-window widths for time, year, and flow
logical to return individual weights rather than the product of all three, default FALSE
logical indicating if data are subset by observations within the maximum window width for faster calculations
logical indicating if count of observations with weights greater than zero is returned
logical if the half-window widths should be returned as a list
numeric vector for window widening if the number of observations with non-zero weights is less than the specified value, use min_obs = NULL
to suppress this behavior
A vector of weights with length equal to the number of observations (rows) in the tidal object. Vectors for all three weighting variables are returned if all = TRUE
.
The default half-window widths for day_num
, year
, and flow
are half a day (12 hours), 10 years, and half the range of salinity/flow in the input data. The half-window widths are expanded by 10% until at least 100 observations have weights greater than zero. This behavior can be suppressed by setting min_obs = NULL
.