vector position that has its closest median value
whichmedian(x)
x
a vector of numbers
dados <- c(1,2,3,4,9,5,6) whichmedian(dados)