R: Convert Clock Coordinates to Cartesian Coordinates
clock2cart
R Documentation
Convert Clock Coordinates to Cartesian Coordinates
Description
Converts clock coordinates (rho, phi) to cartesian
coordinates (x, y).
Usage
clock2cart(rho, phi, circle)
Arguments
rho
Distance of point from center of coordinate system.
phi
Angle between North (12 o' clock), center and the point,
measured clockwise.
circle
Defines the full circle in the units of phi.
Details
Be aware that in clock coordinates and polar coordinate the angle phi
is differently defined!
Value
Data frame with
x, y
Cartesian coordinates.
Author(s)
Rene Locher
See Also
cart2clock, rose-class
Examples
## an easy way to plot a circle
xy <- clock2cart(rho=rep(1,33),phi=seq(0,to=360,length.out=33),circle=360)
plot(xy)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(IDPmisc)
Loading required package: grid
Loading required package: lattice
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/IDPmisc/clock2cart.Rd_%03d_medium.png", width=480, height=480)
> ### Name: clock2cart
> ### Title: Convert Clock Coordinates to Cartesian Coordinates
> ### Aliases: clock2cart
> ### Keywords: dplot manip utilities
>
> ### ** Examples
>
> ## an easy way to plot a circle
> xy <- clock2cart(rho=rep(1,33),phi=seq(0,to=360,length.out=33),circle=360)
> plot(xy)
>
>
>
>
>
> dev.off()
null device
1
>