Skip to contents

Estimates the area under a given curve using the trapezoidal rule, which is equivalent to the average of a left and right Riemann sum.

Usage

auc(x, t = NULL, dt = NULL, na.rm = T)

Arguments

x

data values

t

time values (x axis)

dt

optional data.table

na.rm

remove missing values

Value

total area bounded by the points (t, x)