I'm trying to see if there's a faster way to filter a list based off partial matches. See the code below. This is for JMP 12 by the way, before all of the list improvements.
names default to here(1);
dt = New table("Test",
New Column("SomeList", Set Values(1::100000)),
private
);
lista = Column(dt, "SomeList") << Data Type(Character) << Get Values;
close(dt, no save);
filter_by_partial_match = Function({list, value},
dt = New Table("Faster?",
New Column("funlist", Character, Set Values(list)),
New Column("Bool", Formula(Contains( lowercase(:funlist), lowercase(value) )) ),
private
);
bools = loc(Column(dt, "Bool")<<Get Values);
filtered_list = :funlist[bools];
close(dt, no save);
filtered_list;
);
start_time = HPTime();
filtered_list = filter_by_partial_match(lista, "2");
t_time = HPTime() - start_time;
show(t_time, nitems(filtered_list));
anyone know of any better way?