Am 20.05.2022 um 23:25 schrieb Cottrell, Allin:
Indexation into a list via a selection vector is not supported,
Hi, here's a trivial but hopefully quite general hansl function to
achieve this:
<hansl>
function list selection_list(const list X, matrix indices)
errorif(max(indices) > nelem(X) || min(indices) < 1, "out of
bounds")
indices = uniq(indices)
list L = null
loop i = 1..nelem(indices)
L += X[indices[i]]
endloop
return L
end function
</hansl>
cheers
sven