ggperiodic (version 1.0.0)

qwrap: Quickly wrap data

Description

Wraps periodic data from one specified range to the other in one line.

Usage

qwrap(object, ..., .group = NULL)

Arguments

object,

the object to wrap

...,

named formulas with the form from ~ to (see examples)

.group

optional group column (see wrap)

Details

qwrap is a shortcut to wrap(periodic(obejct, x = range_from), x = range_to)

Examples

Run this code
# 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