Am 14.10.2024 um 14:57 schrieb Riccardo (Jack) Lucchetti:
On 14/10/2024 15:53, Cottrell, Allin wrote:
On Mon, Oct 14, 2024 at 9:25 AM Riccardo (Jack) Lucchetti
<p002264@staff.univpm.it> wrote:

more intuitive to use the xmin() function, as in "series m = xmin(x,
y)". The function, however, is at present scalar-only.

Just saying, the min() function will do what's wanted here, for 2 or
more series, at the cost of defining a list, as in

<hansl>
open data4-10
series mymin = min(deflist(ENROLL, CATHOL))
</hansl>

Aaaah, very clever, I hadn't thought of that. That said, I still think xmin(a,b) would probably be a more straightforward solution for the average user. Any objection to my patch?

Haven't looked at your patch (does it handle NAs as wanted?), but let me put the xmax/xmin functions in perspective: I tend to find them a bit awkward, allowing only _exactly_ two comparison arguments. Every time I use them they feel a bit clunky. I believe their existence predates the generalization of max and min to matrix arguments.

Actually, I formulated my thoughts already 8 years ago, so let me just link to them: https://gretlml.univpm.it/hyperkitty/list/gretl-devel@gretlml.univpm.it/message/VKGX2UVGPVXAYELLNCZ3K625WVBSCYDY/

(BTW, the fact mentioned there is still true that the help text for max/min does not mention the fact that you can give a matrix as arguments. This is not a criticism against anybody, because I could have done it myself, but maybe yet again an argument for creating even more tickets...)

cheers

sven