Median Ordering Statistical R package