layerAvg: layerAvg

Description Usage Arguments Value Examples

View source: R/layerAvg.R

Description

Calculates the integrated mean of y within the defined bounds of x

Usage

1
layerAvg(x, y, x1, x2, na.rm = FALSE)

Arguments

x

Sorted vector of the independent variable

y

A vector of the dependent variable

x1

Lower bound of x

x2

Upper bound of x

na.rm

If TRUE NA values are removed before computation. Default is FALSE

Value

Returns the integrated mean of y

Examples

1
2
3
x <- c(1:10)
y <- x^2
layerAvg(x, y, 2, 8)

jasonfischer/rivSurveyR documentation built on May 18, 2019, 5:54 p.m.