growthPheno (version 1.0-13)

cumulate: Calculates the cumulative sum, ignoring the first element if exclude.1st is TRUE

Description

Uses cumsum to calculate the cumulative sum, ignoring the first element if exclude.1st is TRUE.

Usage

cumulate(x, exclude.1st = FALSE)

Arguments

x

A vector containing the values to be cumulated.

exclude.1st

A logical indicating whether or not the first value of the cumulative sum is to be NA.

Value

A vector containing the cumulative sum.

See Also

cumsum

Examples

Run this code
# NOT RUN {
data(exampleData)
Area.cum <- cumulate(longi.dat$Area)
# }

Run the code above in your browser using DataCamp Workspace