time-sequence of multiple means code

Needs a reprex. See the FAQ, in particular representative data and your function used to calculate the mean. Then, show the desired end result.