Skip to content

ifelse and piecewise function

3 messages · roger king, jim holtman, David Winsemius

#
On Jan 1, 2010, at 7:44 PM, roger king wrote:

            
But, but, but, ... it did return a vector of values. You failed to  
recognize them:

ASEPF(u,0,1,2,0.5)
[1] 0.000935539 0.000935539 0.616399902 0.616399902 0.616399902

The above line is the vector of values that you did not post.

Then you also got.....
Warning messages:
1: In if (is.finite(lower)) { :
   the condition has length > 1 and only the first element will be used
2: In if (is.finite(lower)) { :
   the condition has length > 1 and only the first element will be used

You need to figure out why your invocation of integrate is causing  
complaints (only warnings, mind you) from the R interpreter, but the  
problem is not with any failure to return a vector.