as.gps: Coerce Data Into a gps Object

View source: R/gps.R

as.gpsR Documentation

Coerce Data Into a gps Object

Description

Coerces a sequence of longitudes and latitudes into a GPS dataset. This may be used when read.gps() cannot read a file, or when the data have been manipulated.

Usage

as.gps(longitude, latitude, filename = "")

Arguments

longitude

the longitude in decimal degrees, positive east of Greenwich, or a data frame with columns named latitude and longitude, in which case these values are extracted from the data frame and the second argument is ignored.

latitude

the latitude in decimal degrees, positive north of the Equator.

filename

name of file containing data (if applicable).

Value

A gps object.

Author(s)

Dan Kelley

See Also

Other things related to gps data: [[,gps-method, [[<-,gps-method, gps-class, plot,gps-method, read.gps(), summary,gps-method

Examples

# Location of the Tower Tank at Dalhousie University
towerTank <- as.gps(-63.59428, 44.63572)


oce documentation built on Sept. 11, 2024, 7:09 p.m.