NA encountered in x can be handled three ways. "keep" where final computation will be NA if NAs encountered. "discard" time intervals with NA observation dropped. "zero" NA replaced with 0 and included in the time weighted sum

timeseries_mean(x, t, na_handling = "keep")

Arguments

x

Numeric values

t

Time values

na_handling

String options "keep" "discard" "zero" (default "keep")

Value

Estimate of x across time values