cumulate: Calculates the cumulative sum, ignoring the first element if...

Description Usage Arguments Value Author(s) See Also Examples

Description

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

Usage

1
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.

Author(s)

Chris Brien

See Also

cumsum

Examples

1
2
data(exampleData)
Area.cum <- cumulate(longi.dat$Area)

growthPheno documentation built on Oct. 14, 2021, 5:07 p.m.