prettyPosition: Pretty lat/lon in deg, min, sec

Description Usage Arguments Value Author(s) Examples

View source: R/misc.R

Description

Round a geographical positions in degrees, minutes, and seconds Depending on the range of values in x, rounding is done to degrees, half-degrees, minutes, etc.

Usage

1
prettyPosition(x, debug = getOption("oceDebug"))

Arguments

x

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

debug

set to a positive value to get debugging information during processing.

Value

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

Author(s)

Dan Kelley

Examples

1
2
library(oce)
formatPosition(prettyPosition(10+1:10/60+2.8/3600))

Example output

Loading required package: gsw
[[1]]
[1] 10 10 10 10 10 10 10

[[2]]
[1]  0  2  4  6  8 10 12

[[3]]
[1] "N" "N" "N" "N" "N" "N" "N"

oce documentation built on March 28, 2021, 9:09 a.m.