toPiInt | R Documentation |
Utilities for transforming a reals into [-\pi, \pi)
,
[0, 2\pi)
or [a, b)
.
toPiInt(x)
to2PiInt(x)
toInt(x, a, b)
x |
a vector, matrix or object for whom |
a , b |
the lower and upper limits of |
Note that b
is excluded from the result, see examples.
The wrapped vector in the chosen interval.
# Wrapping of angles
x <- seq(-3 * pi, 5 * pi, l = 100)
toPiInt(x)
to2PiInt(x)
# Transformation to [1, 5)
x <- 1:10
toInt(x, 1, 5)
toInt(x + 1, 1, 5)
# Transformation to [1, 5]
toInt(x, 1, 6)
toInt(x + 1, 1, 6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.