cumsum.R

Cumsum =
  # This does the computation in line
function(x)
{
   for(i in 2:length(x))  # pardon the case where x is of length 1 or 0
     x[i] = x[i-1] + x[i]

   return(x) # don't need the return
}
duncantl/R2llvm documentation built on May 14, 2019, 9:42 a.m.