View source: R/rmGeoIdentity.R
rmGeoIdentity | R Documentation |
Build a buffer around the a set of geographical coordinates and take a random point around the buffer. The function is used to omit the precise location of tricot participants but keeping a close distance to its agro-environment
rmGeoIdentity(longlat, dist = 0.015, nQuadSegs = 2L, ...)
longlat |
a data.frame or matrix with geographical coordinates long lat |
dist |
numeric, buffer distance for all lonlat |
nQuadSegs |
integer, number of segments per quadrant |
... |
further arguments passed to |
A data frame with the random coordinates long lat whithin a pre-defined buffer
xy <- matrix(c(11.097799, 60.801090,
11.161298, 60.804199,
11.254428, 60.822457),
nrow = 3, ncol = 2, byrow = TRUE)
rmGeoIdentity(xy)
#' the function also handles NAs
xy2 <- matrix(c(11.097799, 60.801090,
NA, NA,
11.161298, 60.804199,
11.254428, 60.822457,
11.254428, NA),
nrow = 5, ncol = 2, byrow = TRUE)
rmGeoIdentity(xy2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.