View source: R/randomCoordinates.R
randomCoordinates | R Documentation |
randomCoordinates returns a 'uniform random sample' in the sense that the probability that a point is drawn from any region is equal to the area of that region divided by the area of the entire sphere. This would not happen if you took a random uniform sample of longitude and latitude, as the sample would be biased towards the poles.
regularCoordiaates returns a set of coordinates that are regularly distributed on the globe.
randomCoordinates(n) regularCoordinates(N)
n |
Sample size (number of points (coordinate pairs)) |
N |
Number of 'parts' in which the earth is subdived ) |
Matrix of lon/lat coordiantes
Robert Hijmans, based on code by Nils Haeck (regularCoordinates) and on suggstions by Michael Orion (randomCoordinates)
randomCoordinates(3) regularCoordinates(1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.