Learn R Programming

ecorest (version 2.0.2)

annualizer: Time-averaged restoration project outcomes

Description

annualizer computes time-averaged quantities based on linear interpolation.

Usage

annualizer(timevec, benefits)

Value

A time-averaged value over the specified time horizon.

Arguments

timevec

numeric vector of time intervals.

benefits

numeric vector of ecological output values for a single condition (e.g., future with project) to be interpolated.

References

Robinson R., Hansen W., and Orth K. 1995. Evaluation of environmental investments procedures manual interim: Cost effectiveness and incremental cost analyses. IWR Report 95-R-1. Institute for Water Resources, U.S. Army Corps of Engineers, Alexandria, Virginia.

Examples

Run this code
#Constant value through time
annualizer(c(0,50), c(100,100))
annualizer(seq(0,50), rep(100,51))

#Simple time series
annualizer(seq(0,50), seq(0,50))

#User-specified time intervals
demo.timevec <- c(0,2,20,50)
demo.ben <- c(0,100,90,80)
annualizer(demo.timevec, demo.ben)

Run the code above in your browser using DataLab