Center a vector

ts_center(numvec, na.rm = TRUE, type = c("mean", "median")[1])

Arguments

numvec

A numeric vector

na.rm

Set the na.rm field

type

Center on the "mean" (default) or the "median" of the vector.

Value

A mean or median centered vector

Author

Fred Hasselman