cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
antoinesofradir
Level III

[JSL] How can i know the number of values in my list ?

Hello,

I have a list with lots of values and i would like to know, how many values are there in this list ?

Thanks for your help !

1 ACCEPTED SOLUTION

Accepted Solutions
ms
Super User (Alumni) ms
Super User (Alumni)

Re: [JSL] How can i know the number of values in my list ?

2 REPLIES 2
ms
Super User (Alumni) ms
Super User (Alumni)

Re: [JSL] How can i know the number of values in my list ?

N Items(list)

pmroz
Super User

Re: [JSL] How can i know the number of values in my list ?

If you need to know the number of unique values in the list here's a handy function:

Get_unique_values = Function( {in_list},

{Default Local},

tmp = [=> 0];

Insert Into( tmp, in_list );

tmp << get keys;

);

To use it, first compile the function, and then call it like this:

my_list = {"aa", "bb", "bb", "cc", "cc"};

print(get_unique_values(my_list);

{"aa", "bb", "cc"}