| cart2pol | R Documentation | 
Transform cartesian coordinates to polar
cart2pol(
  x,
  y,
  z = NULL,
  dist.type = c("euclidean", "manhattan"),
  radians = TRUE
)
x | 
 numeric vector, or numeric matrix (see   | 
y | 
 numeric vector; if missing, then   | 
z | 
 numeric vector  | 
dist.type | 
 character; the type of distance calculation  | 
radians | 
 logical; should the output angle be in radians? (  | 
modified from function in beadarrayMSV
cart2pol(1:10, 1:10)
all.equal(cart2pol(1:10, 1:10), cart2pol(cbind(1:10, 1:10)))
# Change radius computation
cart2pol(1:10, 1:10, 1:10) # assumes 'euclidean'
cart2pol(1:10, 1:10, 1:10, 'manhattan')
# use degrees
cart2pol(1:10, 1:10, radians=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.