Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

elimCloseCoord

Eliminate close (overlapping) points (in x & y space)


Description

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.

Usage

elimCloseCoord(
  dat,
  useCol = 1:2,
  elimIdentOnly = FALSE,
  refine = 2,
  nDig = 3,
  callFrom = NULL,
  silent = FALSE
)

Arguments

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

Value

resultant matrix/data.frame

See Also

Examples

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)

wrMisc

Analyze Experimental High-Throughput (Omics) Data

v1.5.4
GPL-3
Authors
Wolfgang Raffelsberger [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.