R/cumul.sum.R

cumul.sum <-
function(x){
y<-rep(0,length(x))
#cumulatively sums a vector x and returns the result
for(i in 1:length(x)){
y[i]<-sum(x[1:i])
}
return(y)
}

Try the IBDhaploRtools package in your browser

Any scripts or data that you put into this service are public.

IBDhaploRtools documentation built on May 2, 2019, 6:48 p.m.