I recently posted this question on the r-help mailing list but got no answers, so I thought I would post it here as well and see if there were any suggestions.
I am
Another try (Marek's is faster)
cumsd2 <- function(y) { n <- nrow(y) apply(y,2,function(i) { Xmeans <- lapply(1:n,function(z) rep(sum(i[1:z])/z,z)) Xs <- sapply(1:n, function(z) i[1:z]) sapply(2:n,function(z) sqrt(sum((Xs[[z]]-Xmeans[[z]])^2,na.rm = T)/(z-1))) }) }