[R] Error in integrate

Ray Brownrigg ray at mcs.vuw.ac.nz
Fri Oct 7 04:37:17 CEST 2005


Murray Jorgensen <maj at stats.waikato.ac.nz> wrote:

> I'm using R 2.0.1 under Windows XP. I get the following message when I 
> run the code listed below. I don't seem to have any problems using the 
> function "slice" outside "integrate".
> 
> Error in integrate(slice, 0, Inf, , , , , , , a, b) * delta :
>          non-numeric argument to binary operator
> 
RTFM!  Integrate returns:
Value:

     A list of class '"integrate"' with components
     :
     :

You need:
A[j] <- integrate(slice,0,Inf,,,,,,,a,b)$value*delta

Ray




More information about the R-help mailing list