View source: R/activity_code.r
wrap | R Documentation |
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))
x |
A vector of numeric data. |
bounds |
The range within which to wrap |
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.
A vector of numeric values within the limits defined by bounds
data(BCItime)
adjtime <- BCItime$time + 1/24
summary(adjtime)
adjtime <- wrap(adjtime, c(0,1))
summary(adjtime)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.