On 14/10/2024 15:53, Cottrell, Allin wrote:
On Mon, Oct 14, 2024 at 9:25 AM Riccardo (Jack) Lucchetti
<p002264(a)staff.univpm.it> wrote:
>
> Long story short: for creating a series that contains the minimum
> between x and y the shortest way we have is to use
>
> <hansl>
> series m = x < y ? x : y
> </hansl>
>
> which is nice, but I just realised that maybe some people would find it
> 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?
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------