cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Xhindi
Level I

Filter out Ion IDs.

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  :) 

Recommended Articles