`R/utils.R`

`avg_adj.Rd`

Calculate average of vector elements adjacent to and excluding the index element. For example, the second element of the result is the average of the first and third elements of the input vector `x`

. Used by `smooth_age_5_zigzag_inner()`

, and possibly useful elsewhere.

avg_adj(x)

x | numeric vector |
---|

numeric vector the same length as `x`

.

Tails are given a value of `NA`

.

#> [1] TRUE