powered by
pava(x, wt = rep(1, length(x)))
pava(c(1,2,4,3,5)) # [1] 1.0 2.0 3.5 3.5 5.0
Run the code above in your browser using DataLab