integrand=function(xeval,x){ #fuction to be evaluated for integration.. # For example the Gaussian distribution.. #parameters of the function zsd=sd(x) zvar=var(x) zmean=mean(x) fact=1/(sqrt(2*pi)*zsd) xdens=fact*exp(-(xeval-zmean)*(xeval-zmean)/(2*zvar)) xdens }