R study notes
Monday, October 20, 2014
Exercise-9
Compute the cumulative sum of a vector x
n=length(x)
z=numeric(n)
for (i in 1:n)
{
z[i]=z[i-1]+x[i]
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment