Integrate {lazy.mat} | R Documentation |
Integrate a Univariate Function f from lower to Vector-Valued x.
Integrate( f, x, lower, subdivisions = 100L, rel.tol = .Machine$double.eps^0.25, abs.tol = rel.tol, stop.on.error = TRUE )
f |
A function to be integrated |
x |
The value at which the integral of f is evaluated |
lower |
The lower limit of the integration |
subdivisions |
: See the help of native integrate function. |
rel.tol |
: See the help of native integrate function. |
abs.tol |
: See the help of native integrate function. |
stop.on.error |
: See the help of native integrate function. |
This function calculates, for i=1,2,...,length(x)
,
integrate( f, lower, x[i] )$value
In essence, it returns
unlist( lapply( x, function(x){ integrate( f, lower, x )$value } ) )
.
A vector containing the results.
func=function(x) x x=0:10 lower=-10 res=Integrate( func, x, lower ) Print( x, res )