From marc_schwartz at me.com  Mon Jul 14 17:12:53 2014
From: marc_schwartz at me.com (Marc Schwartz)
Date: Mon, 14 Jul 2014 10:12:53 -0500
Subject: [Rd] cummax / cummin for complex numbers
In-Reply-To: <9591F061-56E7-4FA6-9A84-AED2C3B56F32@oracle.com>
References: <9591F061-56E7-4FA6-9A84-AED2C3B56F32@oracle.com>
Message-ID: <90840DF0-1654-47C4-97BD-DAD9665F11B7@me.com>


On Jul 14, 2014, at 9:53 AM, Michael Haupt <michael.haupt at oracle.com> wrote:

> Dear all,
> 
> in R 3.1.0, this is happening:
> 
>> cummin(c(1+1i,2-3i,4+5i))
> Error in cummin(c(1 + (0+1i), 2 - (0+3i), 4 + (0+5i))) : 
>  'cummax' not defined for complex numbers
>> cummax(c(1+1i,2-3i,4+5i))
> Error in cummax(c(1 + (0+1i), 2 - (0+3i), 4 + (0+5i))) : 
>  'cummin' not defined for complex numbers
> 
> It may be fixed in R-devel, but I thought I'd mention it to make sure ...
> 
> Best,
> 
> Michael


The help file for cummax/cummin in 3.1.1 specifically states:

x  a numeric or complex ****(not cummin or cummax)**** object, or an object that can be coerced to one of these.


So why would you expect it to work for cummin or cummax when you pass a complex 'x'?

Regards,

Marc Schwartz



[Rd] cummax / cummin for complex numbers
Marc Schwartz