cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use to use Text Explorer to glean valuable information from text data at April 25 webinar.
Choose Language Hide Translation Bar
View Original Published Thread

Filter out Ion IDs.

Xhindi
Level I

Hello I have the following script. I run it but it does not make any differences in my table, and it does not spit any errors. 

 

dt = Current Data Table(); % The only data table I have open. 

exclusion_list = {"P1638070-00-D:TGTX240584C0006:20TVD97GN",

"P1638070-00-D:TGTX240584C0006:20T40A34P",

"P1638070-00-D:TGTX240584C0006:20TXECFDY",

"P1638070-00-D:TGTX240584C0006",}; 

// Add all values to exclude

dt << Select Where(Ion Component ID << exclusion_list);  % Ion Component ID is the column name I want to delete these entries from. 

dt << Delete Rows;

  If there is a faster way to filter out multiple IDs would love to know too Thank you! 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User


Re: Filter out Ion IDs.

Here is the way I would handle this:

names default to here(1);

dt = 
 // Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );

exclusion_list = /*{"P1638070-00-D:TGTX240584C0006:20TVD97GN",

"P1638070-00-D:TGTX240584C0006:20T40A34P",

"P1638070-00-D:TGTX240584C0006:20TXECFDY",

"P1638070-00-D:TGTX240584C0006",};*/ 

{"TIM", "JAMES","JUDY"};

// Add all values to exclude

dt << Select Where(contains(exclusion_list, :Name));  // Ion Component ID is the column name I want to delete these entries from. 

dt << Delete Rows;
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User


Re: Filter out Ion IDs.

Here is the way I would handle this:

names default to here(1);

dt = 
 // Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );

exclusion_list = /*{"P1638070-00-D:TGTX240584C0006:20TVD97GN",

"P1638070-00-D:TGTX240584C0006:20T40A34P",

"P1638070-00-D:TGTX240584C0006:20TXECFDY",

"P1638070-00-D:TGTX240584C0006",};*/ 

{"TIM", "JAMES","JUDY"};

// Add all values to exclude

dt << Select Where(contains(exclusion_list, :Name));  // Ion Component ID is the column name I want to delete these entries from. 

dt << Delete Rows;
Jim
Xhindi
Level I


Re: Filter out Ion IDs.

That worked. Thank you. The file wouldn't open with its file name so i still used Current Data Table