trap: Calculate Area Under the Curve Using Trapezoids

Description Usage Arguments Value

View source: R/trap.r

Description

Calculates AUC using the trapezoidal method. Assumes data represent a single profile. Despite choice of method, only linear interpolation is used for areas of intervals beginning or ending with y: 0.

Usage

1
trap(x = NA, y = NA, method = 1)

Arguments

x

x variable, i.e. time

y

y variable, i.e. concentration

method

method:

  • 1: linear up - linear down

  • 2: linear up - logarithmic down

  • 3: linear before Tmax, logarithmic after Tmax

Value

area (length-one numeric)


qpNCA documentation built on Aug. 16, 2021, 5:08 p.m.