Function cyclo.mean computes cyclical (i.e. circular) means while function lin.cyclo.ts "linearizes" a cyclical time-series (see details). This is particularly useful to test trends along time (OTHER FUNCTION???).

cyclo.mean(x, na.rm = T)

lin.cyclo.ts(ts, cycle.duration, start.is.0 = T)

Arguments

x

a vector containing angles (in radians) to be averaged

na.rm

boolean. Should NA be removed prior to circular mean computation?

ts

a circular time series that is to be linearized.

cycle.duration

the duration of a cycle in ts

start.is.0

boolean. Should the start of the linearized time series be set to 0? Else it is taken as the first value of ts.

Details

Function cyclo.mean computes a cyclical (i.e. circular) mean in radians.

Function lin.cyclo.ts returns a "linearized" version of a cyclical time-series (mostly used for time-series of dates along cycles). The function works by computing distances along the cycles between all consecutive points. Note that there is two ways to compute the distance between two point from a cyclical variable: clockwise or counter-clockwise. lin.cyclo.ts always takes the shortest path (most conservative option). The function then assigns a sign to this distance as a function of its rotational direction (positive when going in the direction of time, negative when going opposite). The "linearized" time-series is obtained with the cumulative sum of those distances.

References

NONE for now!

Author

Nicolas Djeghri, UBO

Examples

#WRITE SOME R CODE HERE!!!