Skip to content
Prev 258708 / 398502 Next

adaptIntegrate - how to pass additional parameters to the integrand

On 03.05.2011 06:43, HC wrote:
Looks like you are talking about the cubature package rather than about 
base R. Frr the latter question: Please ask the package maintainer 
rather than the list. Ideally send him code to implement the requested 
feature and the maintainer will probably add your code. Not all package 
maintainers read R-help.

For an ad hoc solution:

Just use

adaptIntegrate(function(x, argA=a, argB=b) f(x, argA=argA, argB=argB), 
......)

in order to set additional arguments for the function call.

Uwe Ligges