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
jacksonperry
Level I

Select non Duplicate Value

Hi all, Is there any possible way in JMP to select non-duplicate value in the same column and define as variable list, without deleting the duplicate value. Below is an example:

 

Data Table (1)

 

Data Point           ModelType              FeedRate

1/1/2021              AVG                         1

1/2/2021              AVG                         1.2

1/3/2021              AVG                          1.3

1/1/2021              MEAN                       0.8   

1/2/2021              MEAN                       0.7

1/3/2021              MEAN                       0.6   

1/1/2021              ACTUAL                    1.2

1/2/2021              ACTUAL                    1.4

1/3/2021              ACTUAL                    1.3   

1/1/2021              MIN                           0.1   

1/2/2021              MIN                           0.1

1/3/2021              MIN                           0.1   

 

I want to create variable list for different modeltyppe (ex: MEAN: ACTUAL, AVG, MIN) by using model_list = Column( dt, "ModelType" ) << get values;

The reason i don't want to delete the duplicate modeltype is because it has different value for each date. Is there any possible way i can define the model type as (MEAN, AVG,ACTUAL) without considering the duplicate modeltype.

1 REPLY 1
jthi
Super User

Re: Select non Duplicate Value

If you want a list of unique values, you can use Associative Array or Summarize (there are other methods, but these are usually enough). Below are some different examples on how to get unique values from Big Classes name column:

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");

//Associative Array
unique_names = Associative Array(:name) << get keys;
unique_names = Associative Array(:name << get values) << get keys;
unique_names = Associative Array(Column(dt, "name") << get keys);
unique_names = Associative Array(dt[0, "name"]) << get keys;
unique_names = Associative Array(dt:name) << get keys;

//Summarize
//Will save value to unique_names variable
Summarize(dt, unique_names = by(:name));

 

-Jarmo