qwrap: Quickly wrap data

View source: R/qwrap.R

qwrapR Documentation

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

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))


ggperiodic documentation built on March 31, 2023, 11:51 p.m.