Hi,

anyone knows about any functions in R can get multidimensional integration 
not over a multidimensional rectangle (not adapt).

For example, I tried the following function f(x,n)=x^n/n!

phi.fun<-function(x,n)
{ if (n==1) {
        x
        }else{
                integrate(phi.fun, lower=0, upper=x, n=n-1)$value
                }
}

I could get f(4,2)=4^2/2!=8, but failed in f(4,3)=4^3/3! Thanks

Best,
Lynette

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to