Learn R Programming

swfscMisc (version 1.6.5)

convert.angle: Angle Conversion

Description

Converts angles between radians and degrees.

Usage

convert.angle(x, from = c("degrees", "radians"), to = c("radians", "degrees"))

Arguments

x

numeric. The angle to be converted.

from, to

character. Units to convert from and to. Can be "radians" or "degrees" or any partial match (case-sensitive).

Author

Eric Archer eric.archer@noaa.gov

Examples

Run this code
convert.angle(45, "deg", "rad")
convert.angle(4.5, "r", "d")

Run the code above in your browser using DataLab