View source: R/elimCloseCoord.R
elimCloseCoord | R Documentation |
elimCloseCoord
reduces number of rows in 'dat' by eliminating lines where x & y coordinates (columns of matrix 'dat
' defined by 'useCol
') are identical (overlay points) or very close.
The stringency for 'close' values may be fine-tuned using nDig
), this function uses internally firstOfRepeated
.
elimCloseCoord(
dat,
useCol = 1:2,
elimIdentOnly = FALSE,
refine = 2,
nDig = 3,
callFrom = NULL,
silent = FALSE
)
dat |
matrix (or data.frame) with main numeric input |
useCol |
(numeric) index for numeric columns of 'dat' to use/consider |
elimIdentOnly |
(logical) if TRUE, eliminate real duplicated points only (ie identical values only) |
refine |
(numeric) allows increasing stringency even further (higher 'refine' .. more lines considered equal) |
nDig |
(integer) number of significant digits used for rounding, if two 'similar' values are identical after this rounding the second will be eliminated. |
callFrom |
(character) allows easier tracking of message(s) produced |
silent |
(logical) suppress messages |
resultant matrix/data.frame
findCloseMatch
, firstOfRepeated
da1 <- matrix(c(rep(0:4,5),0.01,1.1,2.04,3.07,4.5),nc=2); da1[,1] <- da1[,1]*99; head(da1)
elimCloseCoord(da1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.