Displaying 1 result from an estimated 1 matches for "myfunk1".
Did you mean:
myfunc1
2008 Jan 22
2
R object as a function
I want to use a function as an argument to ingtegrate it twice.
See the following (senseless) example of a double integration:
test<-function(sf,lo,up,rest) {
innerFkn<-function(sf,lo) {
inte=integrate(f=sf,lower=lo,upper=4)
return( inte$value )
}
integral=integrate(f=innerFkn,lower=1,upper=2,sf=sf,lo=lo,up=up)
return( integral$vlaue+rest )
}