Learn R Programming

oce (version 0.8-10)

prettyPosition: Round a geographical positions in degrees, minutes, and seconds

Description

Round a geographical positions in degrees, minutes, and seconds

Usage

prettyPosition(x)

Arguments

x
a series of one or more values of a latitude or longitude, in decimal degrees

Value

  • A vector of numbers that will yield good axis labels if formatPosition is used.

Details

Depending on the range of values in x, rounding is done to degrees, half-degrees, minutes, etc.

Examples

Run this code
library(oce)
formatPosition(prettyPosition(10+1:10/60+2.8/3600))

Run the code above in your browser using DataLab