to_deg: Converts radians to degrees

Description Usage Arguments Examples

View source: R/to_deg.R

Description

to_deg takes an input of a radian value and will convert it to a degree value by the formula: degree = radian * 180 / pi This utility conversion is useful when dealing with geocoding coordinates, as it might be desirable to obtain the original coordinate values in degrees.

Usage

1
to_deg(rad)

Arguments

rad

a value in radians

Examples

1
2
3
4
# Input list of degree values
# Longitude values range between 0 and +-180 degrees
rad <- runif(1, -180, 180) * pi / 180
deg <- to_deg(rad)

mike-decarlo/gcd documentation built on Oct. 19, 2020, 9:16 a.m.