Dear all, I am currently working with the spatstat package with 3D samples. I am trying to evaluate a non analytical function over the window that encloses the sample and I need to know which is the fastest way of doing it.
The function input is a 3 coordinate position in the window (x,y,z) and a list of parameters (a,b,c). The output is a numerical value. n <- function(x,y,z,a,b,c) But I need to do it over the whole volume. For 2 dimensions it can be done with A <- as.im(function,window,parameters) norm <- integral.im(A) For 3 dimensions I have tried to pass an array of a grid covering the window (like a quadrature scheme) and then summing up the output array, but I would like to know if there is any faster way of integrating the function. Thank you very much, LluĂs Hurtado IFCA www.ifca.unican.es ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.