Wraps periodic data from one specified range to the other in one line.
qwrap(object, ..., .group = NULL)
the object to wrap
named formulas with the form from ~ to (see examples)
from ~ to
optional group column (see wrap)
qwrap is a shortcut to wrap(periodic(obejct, x = range_from), x = range_to)
qwrap
wrap(periodic(obejct, x = range_from), x = range_to)
# NOT RUN { x <- seq(0, 360 - 20, by = 20) df <- data.frame(x = x, y = cos(x*pi/180)) qwrap(df, x = c(0, 360) ~ c(-180, 180)) # }
Run the code above in your browser using DataLab