to_rad: Converts degrees to radians

Description Usage Arguments Examples

View source: R/to_rad.R

Description

to_rad takes an input of a degree value and will convert it to a radian value by the formula: radian = degree * pi / 180 Typically, this conversion would be in preparation of geocoordinate calculations in which the desired form of the coordinates is radians.

Usage

1
to_rad(deg)

Arguments

deg

a value in degrees

Examples

1
2
3
4
# Input list of degree values
# Longitude values range between -180 and +180
deg <- runif(1, -180, 180)
rad <- to_rad(deg)

wolfm4ne/gcd documentation built on Oct. 18, 2020, 10:38 p.m.