cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

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