powered by
mu.GE
mu.GE(x, y=x)
mu.GE <- function(x, y=x) { <\dots> if (length(y)>1) apply(rbind(x,y),2,mu.GE,nrow(x)) else as.numeric(NAtoZer(outer(x[1:y],x[-(1:y)],">="))) } \dots>
a <- c(4, 2, 5, 1, 4, NA, 6) mu.GE(a)
Run the code above in your browser using DataLab