powered by
Uses cumsum to calculate the cumulative sum, ignoring the first element if exclude.1st is TRUE.
cumsum
TRUE
cumulate(x, exclude.1st = FALSE)
A vector containing the cumulative sum.
vector
A vector containing the values to be cumulated.
A logical indicating whether or not the first value of the cumulative sum is to be NA.
logical
NA
Chris Brien
data(exampleData) Area.cum <- cumulate(longi.dat$Area)
Run the code above in your browser using DataLab