Description Usage Arguments Details Value Author(s) See Also Examples
Create a matrix of locations with a column of latitudes and longitudes
1 | create.lats(x, loc="locality", long="longitude", lat="latitude")
|
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 |
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.
A matrix with a column of longitude and latitude, respectively with rownames correspnding to each location
Matthew Vavrek
1 2 3 | #to reproduce the fdata.lats dataset
data(fdata.list)
create.lats(fdata.list, loc="locality", long="longitude", lat="latitude")
|
Loading required package: sp
Loading required package: maps
Loading required package: shapefiles
Loading required package: foreign
Attaching package: 'shapefiles'
The following objects are masked from 'package:foreign':
read.dbf, write.dbf
longitude latitude
locA -109 47
locB -90 45
locC -109 41
locD -99 36
locE -115 40
locF -119 42
locG -113 44
locH -94 40
locI -110 33
locJ -116 41
locK -94 46
locL -108 39
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.