Learn R Programming

ROC (version 1.48.0)

trapezint: trapezoidal rule for AUC

Description

trapezoidal rule for AUC

Usage

trapezint(x, y, a, b)

Arguments

x
x - abscissae
y
y - ordinates
a
a - lower limit of integration
b
b - upper limit of integration

Value

estimated AUC

Details

uses approx

References

See Also

Examples

Run this code
x <- sort(runif(30))
y <- sin(x)
print(trapezint(x,y,0,1))

Run the code above in your browser using DataLab