Learn R Programming

evabic (version 0.1.4)

area_rect: Area Under the Curve

Description

Compute area under the curve by using the rectangle's method.

Usage

area_rect(x, y)

Value

A numeric.

Arguments

x

Numeric.

y

Numeric.

Examples

Run this code
x <- c(0, 0, 0.5, 1)
y <- c(0, 0.5, 0.5, 1)
plot(x, y, type = "b")
evabic:::area_rect(x, y)

Run the code above in your browser using DataLab