Dear OF Team, Is there a way to do the following test more nicely/shorter: tree[species=1 or species=8 or species=10 or species=11 or species=12 or species=16 or species=19 or species=22 or species=23] What I'm looking for is something like this (e.g. in R): tree[species %in% c(1,8,10,11,12,16,19,22,23)] Could this be implemented if doesn't exist yet? Thanks! Andras asked 17 May '18, 11:42 Andras |
Hi András,
Many thanks, answered 07 Jun '18, 10:41 Stefano (OF) ♦♦ Hi, It seems there is a problem with the expression above. If I try to use it to get a subset of a group of items, it doesn't work: count(parent()/tree[idm:contains(idm:array(1,8,10,11,12,16,19,22,23),species)]) Am I doing something wrong?
(26 Jun '18, 10:26)
Andras
The species code is an alphanumeric value, so it must be wrapped into single or double quotes. Try to use this expression instead: count(parent()/tree[idm:contains(idm:array('1','8','10','11','12','16','19','22','23'),species)])
(26 Jun '18, 14:28)
Stefano (OF) ♦♦
|