You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
466 B

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/numeric.R
\title{Calculate area under a curve}
trapz(x, y)
\item{x}{vector (of length n)}
\item{y}{vector (of length n)}
vector (of length n - 1)
Numerically calculate area under an arbitrary curve (defined by x, y coord pairs)
using trapezodial integration. See Wikipedia for more info on trapz integration.