Dear All, I have a function f(x,y,z)=exp(x^3+y^4+x^2*y+x*z^2+y/z) over D, where is D={ (x,y,z)| 0 <z<Inf, 0<y<c1*z, 0<x<c2*/y}. x,y,z are all vectors and c1 and c2 are constants. I tried the "adapt" package and I get some error. This is the error message:
"Error in function (z, y, x) : argument "x" is missing, with no default" I included my R code. Can anyone please let me know how I can calculate the numerical integral of such a function where some of the boundaries are functions of the other variables? require(adapt) fn<-function(z,y,x) {exp(x^3+y^4+x^2*y+x*z^2+y/z)} x<-runif(200);y<-runif(200);z<-runif(200); c1<-.5;c2<-5;M<-100; #M to represent infinity i1<-adapt(3,lo=c(.0001,0,0),up=c(M,c1*z,c2/y),functn=fn)$value print(i1); Thanks, -- Davood Tofighi [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.