I have been trying to understand integration in R and I have come across a code that looks like this:
Lambda=function(t) integrate(f=lambda,lower=0,upper=t)$value
What does $value
mean here? What's the '$' sign doing? It's not explained anywhere in the help or on the internet. Please help.
Answer
From ?integrate
(bold is mine).
Value:
A list of class ‘"integrate"’ with components
value: the final estimate of the integral.
abs.error: estimate of the modulus of the absolute error.
subdivisions: the number of subintervals produced in the subdivision
process.
message: ‘"OK"’ or a character string giving the error message.
call: the matched call.
In other words, integrate
returns an object of class "integrate"
, of which element value
contains the estimate of the integral.
No comments:
Post a Comment