xy_to_polar: Convert data coordinates to polar coordinates

View source: R/transform.R

xy_to_polarR Documentation

Convert data coordinates to polar coordinates

Description

Convert data coordinates to polar coordinates

Usage

xy_to_polar(x, y, track_index = current_track_index(), flip = TRUE)

Arguments

x

X-locations of the data points.

y

Y-locations of the data points.

track_index

Index of the track.

flip

If it is FALSE, it returns theta for the original spiral (before flipping).

Details

Note different settings of flip and reverse in spiral_initialize affect the conversion.

Value

A data frame with two columns: theta (in radians) and r (the radius).

Examples

# There is no example
NULL


spiralize documentation built on Aug. 9, 2022, 5:09 p.m.