Learn R Programming

fossil (version 0.4.0)

create.lats: Creating a table of Latitudes and Longitudes

Description

Create a matrix of locations with a column of latitudes and longitudes

Usage

create.lats(x, loc="locality", long="longitude", lat="latitude")

Arguments

x

a table arranged in columnar format, with one column indicating the locations, another the latitude and another the longitude

loc

the name or number of the column giving the names of the locations to be used

long

the name or number of the column giving the longitude of the locations

lat

the name or number of the column giving the latitude of the locations

Value

A matrix with a column of longitude and latitude, respectively with rownames correspnding to each location

Details

This function will create a location table with longitude (X) and latitude (Y) or their equivalents for every location. This function ceates a matrix in the format needed for most of the geographic functions found in the fossil package.

See Also

create.matrix

Examples

Run this code
# NOT RUN {
#to reproduce the fdata.lats dataset
data(fdata.list)
create.lats(fdata.list, loc="locality", long="longitude", lat="latitude")
# }

Run the code above in your browser using DataLab