How-to-select-rows-that-match-any-value-in-a-list
https://community.jmp.com/t5/JMP-Knowledge-Base/How-to-select-rows-that-match-any-value-in-a-list/ta-p/575348
/* Open a sample data table. */
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
/* Create a list of ages. */
myList = {9, 12, 15, 17, 18};
/* Select all rows which have an age that is in the list. */
dt <<( Contains( myList, :age ) );
Wait( 2 ); // For demonstration purposes
dt <<; // For demonstration purposes
/* Create a list of student names. */
myStudents = {"HENRY", "ROBERT", "BARBARA", "SALLY", "MARION"};
/* Select all rows which have any of the names in the list. */
dt <<( Contains( myStudents, :name ) );
Comments
Post a Comment