Rec2Polar {KEPTED} | R Documentation |
Rectangular to polar coordinates
Description
Given a d
-dimensional vector X
in rectangular coordinate, this
function compute its polar coordinate (R,Theta)
, where R
is the
length of X
and the (d-1)
-dimensional vector Theta
contains the d-1
angles of X
.
Usage
Rec2Polar(X)
Arguments
X |
A vector in rectangular coordinate. Suppose the dimension of
|
Details
The formula corresponds to theta=g(v) as in Lemma 1 of Tang and Li (2024).
See also Anderson (2003).
Note that when d=2
, V
will be (sin(Theta),cos(Theta))
.
Value
A list of the following:
R |
The length of |
Theta |
A vector of length |
References
Tang, Y. and Li, B. (2024), “A nonparametric test for elliptical distribution based on kernel embedding of probabilities,” https://arxiv.org/abs/2306.10594 Anderson, T. W. (2003). An Introduction to Multivariate Statistical Analysis. John Wiley & Suns, Inc. Huboken, New Jersey.
Examples
X=c(3,1,3)
Rec2Polar(X)