Skip to content
Back to formatted view

Raw Message

Message-ID: <200510070237.j972bH2Y008093@tahi.mcs.vuw.ac.nz>
Date: 2005-10-07T02:37:17Z
From: Ray Brownrigg
Subject: Error in integrate

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