This function is actually quite stupid as it can converge on bogus results scaled adjustments based on deviation from threshold distances would be better
findOverlap(x, thresh)fixOverlap(
x,
thresh = 0.6,
adj = 0.2,
min.x = 0.8,
max.x = length(x) + 0.2,
maxIter = 1000,
trace = FALSE
)
vector of horizontal positions
horizontal threshold defining "overlap", must be < 1, ideal values likely in [0.3, 0.8]
adjustments are tested within runif(min=adj * -1, max=adj)
left-side boundary condition
right-side boundary condition
maximum number of iterations to attempt before giving up and returning integer sequence
print diagnostics'
findOverlap
a vector of the same length as x
, preserving rank-ordering and boundary conditions.
findOverlap
a vector of the same length as x
, preserving rank-ordering and boundary conditions.