[R] Integrate a 1-variable function with 1 parameter (Jose L. Romero)

jose romero jlaurentum at yahoo.com
Wed Aug 27 16:23:44 CEST 2008


Hey fellas:

I would like to integrate the following function:

integrand <- function (x,t) {
	exp(-2*t)*(2*t)^x/(10*factorial(x))
}

with respect to the t variable, from 0 to 10.
The variable x here works as a parameter: I would like to integrate the said function for each value of x in 0,1,..,44.

I have tried Vectorize to no avail.

Thanks in advance,
jose romero



More information about the R-help mailing list