[Gretl-users] sumif equivalent

Riccardo (Jack) Lucchetti r.lucchetti at univpm.it
Tue Nov 24 10:35:08 EST 2015


On Tue, 24 Nov 2015, Sven Schreiber wrote:

> series x2 = (x > 10) ? x : 0
> scalar mysum2 = sum(x2)

Or coalesce the two operations into one:

scalar mysum2 = sum((x > 10) ? x : 0)

-------------------------------------------------------
   Riccardo (Jack) Lucchetti
   Dipartimento di Scienze Economiche e Sociali (DiSES)

   Università Politecnica delle Marche
   (formerly known as Università di Ancona)

   r.lucchetti at univpm.it
   http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------


More information about the Gretl-users mailing list