trapint: Trapezoidal Integration

Description Usage Arguments Value Author(s) Examples

Description

Trapezoidally integrates the variable x as a function of v.

Usage

1
trapint(v, x)

Arguments

v

Variable of integration (ie, depth, time)

x

Integrand (ie, value of interest)

Value

Returns a single numeric value that is the result of the trapezoidal integration.

Author(s)

Kate Evans, UMT

Examples

1
2
3
4
5
#Trapezoidally integrate nitrate levels at 6 depths to find the total
#nitrate in a system
nitrates <- c(1, 1, 3, 3, 4, 5)
depths <- c(1, 5, 20, 35, 50, 90)
trapint(depths, nitrates)

kevans27/aqeco documentation built on May 16, 2019, 4:08 a.m.