David Winsemius wrote: > cumapply <- function (FUN, X) > { FUN <- match.fun(FUN) > answer <- sapply(1:length(X), function(x) { FUN(X[1:x])} ) > return(answer)}
Cool, thanks. It's still interesting to me that there's no such thing built-in. Best wishes, -- --OKB (not okblacke) Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.