On Thu, 20 Jan 2022, Marcin Błażejowski wrote:
do we have a function similar to selifc() but defined for lists?
Not as such, but it's easy enough to "fake it", exploiting the
exchangeability between lists and vectors. Turn the list into a
vector, apply selifc, then convert back to a list.
<hansl>
open data4-10
# make a list containing all variables
list L = dataset
# turn L into a vector
matrix Lm = L
# define a selection vector
matrix sel = ones(1, nelem(L))
sel[2] = 0
sel[7] = 0
# create a list subject to the selection
list Lsel = selifc(Lm, sel)
list Lsel print
</hansl>
Allin