cart2polar: Convert Cartesian To Polar

Description Usage Arguments Value Examples

Description

This is a function that converts a set of cartesian coordinates to a set of polar coordinates.

Usage

1
cart2polar(x1, y1, x2, y2)

Arguments

x1

The x-coordinate of your origin.

y1

The y-coordinate of your origin.

x2

A number or vector of numbers of destination points.

y2

A number of vector of numbers of destination points.

Value

This function returns a data.frame with 4 columns. "x" is the distance between the xcoordinate and the origin, "y" is the distance between the y coordinate and the origin, theta is the angle from the original point, and r is the distance between the two points.

Examples

1
cart2polar(1,1,c(-2,2,1),c(11,1,2))

ecology-rocks/disperseR documentation built on May 15, 2019, 7:58 p.m.