- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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