degrees_to_radians | R Documentation |
Convert degrees to radians or radians to degrees.
degrees_to_radians(degrees)
radians_to_degrees(radians)
degrees |
|
radians |
|
vector
with converted degrees/radians.
Missing values (NA
s) are returned as they are.
Ludvig Renbo Olsen, r-pkgs@ludvigolsen.dk
# Attach packages
library(rearrr)
library(dplyr)
# Degrees to radians
degrees_to_radians(c(90, 180, 270))
# Radians to degrees
radians_to_degrees(c(pi / 2, pi, 1.5 * pi))
# Get back the original degrees
radians_to_degrees(degrees_to_radians(c(90, 180, 270)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.