x <- cbind(x1 = 3, x2 = c(4:1, 2:5))
colMedians(x)
colProds(x)
colSds(x)
mask<-cbind(rep(c(TRUE,FALSE),4),
rep(c(TRUE,FALSE),each=4))
colMediansMasked(x,mask)
colMeansMasked(x,mask)
colSdsMasked(x,mask)
Run the code above in your browser using DataLab