powered by
Input data outside the given bounds (default radian [0, 2*pi]) are wrapped to appear within the range.
wrap(x, bounds = c(0, 2 * pi))
A vector of numeric values within the limits defined by bounds
bounds
A vector of numeric data.
The range within which to wrap x values
x
As an example of wrapping, on bounds [0, 1], a value of 1.2 will be converted to 0.2, while a value of -0.2 will be converted to 0.8.
data(BCItime) adjtime <- BCItime$time + 1/24 summary(adjtime) adjtime <- wrap(adjtime, c(0,1)) summary(adjtime)
Run the code above in your browser using DataLab