View source: R/ordering_functions.R
order_outsidein | R Documentation |
Return the ordering of locations decreasing in their distance to the average location. Reverses middleout.
order_outsidein(locs, lonlat = FALSE)
locs |
A matrix of locations. Each row of |
lonlat |
TRUE/FALSE whether locations are longitudes and latitudes. |
A vector of indices giving the ordering, i.e. the first element of this vector is the index of the location farthest from the center.
n <- 100 # Number of locations
d <- 2 # dimension of domain
locs <- matrix( runif(n*d), n, d )
ord <- order_outsidein(locs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.