scacum: Cummulative-scaled sums

Description

This function computes cummulative sums of time-series replicates.

Usage

1
scacum(x, y = NA, z = NA)

Arguments

x

numeric vector of time-series replicates with names of the vector being time units.

y

constant, or vector if the processed time-series replicates have several levels, to scale the computed cumulative values. If NA then the computed cumulative sums are not scaled.

z

NA, or numeric constant. Reference time(s) in range(s) of the vector names to scale the cumulative values. If NA then maximum value in the time-units range is used.

Details

Cummulative sums of time-series replicates (e.g. tree-radial increments) are scaled on reference constants (e.g. individual tree diameters).

Value

data frame with the original vector, and its scaled-cummulative sums.

Author(s)

Wilson Lara <wilarhen@gmail.com>, Felipe Bravo <fbravo@pvs.uva.es>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
x <- c(0.79,0.32,0.53,0.43,0.18)
names(x) <- 1948:1952
y <- 4
z <- 1951
scacum(x,y,z)

##If y = NA then cummulative values are scaled arround
##max(cumsum(x)):
max(cumsum(x))
scacum(x,NA)

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.