cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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"}

Recommended Articles