integrateA {docopulae} | R Documentation |
Integrate Alternative
Description
integrateA
is a tolerance wrapper for integrate
.
It allows integrate
to reach the maximum number of subdivisions.
Usage
integrateA(f, lower, upper, ..., subdivisions = 100L,
rel.tol = .Machine$double.eps^0.25, abs.tol = rel.tol,
stop.on.error = TRUE, keep.xy = FALSE, aux = NULL)
Arguments
f , lower , upper , ... , subdivisions , rel.tol , abs.tol , stop.on.error , keep.xy , aux |
see |
Details
See integrate
.
See Also
Examples
f = function(x) ifelse(x < 0, cos(x), sin(x))
#curve(f(x), -1, 1)
try(integrate(f, -1, 1, subdivisions=1)$value)
integrateA(f, -1, 1, subdivisions=1)$value
integrateA(f, -1, 1, subdivisions=2)$value
integrateA(f, -1, 1, subdivisions=3)$value
[Package docopulae version 0.4.0 Index]