From joelpf at u.washington.edu  Fri Nov 25 22:38:47 2005
From: joelpf at u.washington.edu (joelpf@u.washington.edu)
Date: Fri, 25 Nov 2005 22:38:47 +0100 (CET)
Subject: [Rd] "integrate" error using a constant function (PR#8348)
Message-ID: <20051125213847.8BA0F103B2@slim.kubism.ku.dk>

Full_Name: Joel Franklin
Version: 2.2.0
OS: WinXP-Prof
Submission from: (NULL) (63.226.223.22)


The "integrate" function, when evaluating an integrand function that is constant
(therefore not a function of the integral) cannot be valuated, and instead
throws an error. Instead, the interate function should evaluate the constant
function as a rectangular area with length (upper-lower).

For example:

integrand<-function(x){5}
integrate(f=integrand,lower=1,upper=5)

"Error in integrate(f = integrand, lower = 1, upper = 5) : 
        evaluation of function gave a result of wrong length"



[Rd] "integrate" error using a constant function (PR#8348)
joelpf@u.washington.edu