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.
trap(x = NA, y = NA, method = 1)x variable, i.e. time
y variable, i.e. concentration
method:
1: linear up - linear down
2: linear up - logarithmic down
3: linear before Tmax, logarithmic after Tmax
area (length-one numeric)