Description Usage Arguments Value Examples
Make a distance matrix
1 2 | point2DIST(dta, miles = FALSE,
proj4string = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ")
|
dta |
This is a dataframe. Columns of interest must be named: Site, Lat (for latitude), Lon (for longitude). |
miles |
TRUE/FALSE. whether or not to calculate distance in miles. if FALSE, then estimates in kilometres |
proj4string |
sp projection for latitude longitude |
A distance matrix in kilometres between all pairs sites
1 2 | dta <- data.frame(Site= LETTERS[1:4], Lat= 1:4, Lon= 5:8, Pop=100:103)
point2DIST(dta)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.