Learn R Programming

spaa (version 0.2.2)

deg2dec: Degree to decimal

Description

Convert latitude or longitude from degree to decimal format

Usage

deg2dec(h, m, s)

Arguments

h
Degree
m
Minute
s
Second

Value

Degree of decimal format

Details

Convert latitude or longitude from degree to decimal format.

Examples

Run this code

## deg2dec() example
##Paris
L1 = deg2dec(-2,20,14)
phi1 = deg2dec(48, 50, 11)
##Washington DC
L2 = deg2dec(77,03,56)
phi2 = deg2dec(38,55,17)

Run the code above in your browser using DataLab