Description Usage Arguments Details Value See Also Examples
Given two sets of longitude/latitude locations computes the Great circle (geogrpahic) distance matrix among all pairings. This function and help file are copied from the fields library.
1 | rdist.earth(loc1, loc2, miles = TRUE, R = NULL)
|
loc1 |
Matrix of first set of lon/lat coordinates first column is the longitudes and second is the latitudes. |
loc2 |
Matrix of second set of lon/lat coordinates first column is the longitudes and second is the latitudes. If missing x1 is used. |
miles |
If true distances are in statute miles if false distances in kilometers. |
R |
Radius to use for sphere to find spherical distances. If NULL the radius is either in miles or kilometers depending on the values of the miles argument. If R=1 then distances are of course in radians. |
Surprisingly this all done efficiently in S.
The great circle distance matrix if nrow(x1)=m and nrow( x2)=n then the returned matrix will be mXn.
rdist, exp.earth.cov
1 2 3 |
Package spectralGP (1.3.3) is loaded.
===============================================================
WARNING: spectralGP uses objects in the form of environments,
thereby passing by reference. Various method functions make
changes to the input gp object as a side effect, thereby
changing the object in the calling environment, and
returning NULL.
===============================================================
Attaching package: 'spectralGP'
The following object is masked from 'package:stats':
simulate
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.