R/tiesort.R

tiesort <- function (xx=NULL, yy=NULL)
# sorts y values in increasing x-order
# within blocks of tied x-values, sorts y values in increasing y-order
{
  bignumber=100
  x=round(xx*bignumber)/bignumber
  y=round(yy*bignumber)/bignumber
  xtemp = x[order(x,y)]
  ytemp = y[order(x,y)]
  return(list(x=xtemp, y=ytemp))
}
monotonicity/stacmr documentation built on Jan. 28, 2020, 3:29 a.m.