##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (pos, v)
c(median(v[pos[1]:pos[2]], na.rm = T), mad(v[pos[1]:pos[2]],
na.rm = T))Run the code above in your browser using DataLab