- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
script to subset selected rows
Hi,
I have the following script:
I Want to select some rows and subset them.
selection finds 369 rows, but subset only 140 rows.
Does someone have any idea what I am missing?
dt = Current Data Table();
Column(dt, "DieX") << data type(Numeric) << Modeling Type(Continuous) << Format(Best, 12);
Column(dt, "DieY") << data type(Numeric) << Modeling Type(Continuous) << Format(Best, 12);
dt << select where(
1045 <= :DieX <= 1055 & 1221 <= :DieY <= 1228
| 1145 <= :DieX <= 1155 & 1221 <= :DieY <= 1228
| 1045 <= :DieX <= 1055 & 770 <= :DieY <= 778
| 1145 <= :DieX <= 1155 & 770 <= :DieY <= 778
);
dt_subset = dt << subset(output table("Defects"), selected rows(1));
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: script to subset selected rows
For me it seems to subset correct amount of rows (369) (I made slight modifications to your script, but even the original did subset correct amount of rows)
Names Default To Here(1);
dt = Open("$DOWNLOADS/Setup2_0_2_Surface.jmp");
dt << clear select << Clear Column Selection;
Column(dt, "DieX") << data type(Numeric) << Modeling Type(Continuous) << Format(Best, 12);
Column(dt, "DieY") << data type(Numeric) << Modeling Type(Continuous) << Format(Best, 12);
dt << select where(
1045 <= :DieX <= 1055 & 1221 <= :DieY <= 1228
| 1145 <= :DieX <= 1155 & 1221 <= :DieY <= 1228
| 1045 <= :DieX <= 1055 & 770 <= :DieY <= 778
| 1145 <= :DieX <= 1155 & 770 <= :DieY <= 778
);
dt_subset = dt << subset(output table("Defects"), selected rows(1), Selected Columns(0));
-Jarmo
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: script to subset selected rows
For me it seems to subset correct amount of rows (369) (I made slight modifications to your script, but even the original did subset correct amount of rows)
Names Default To Here(1);
dt = Open("$DOWNLOADS/Setup2_0_2_Surface.jmp");
dt << clear select << Clear Column Selection;
Column(dt, "DieX") << data type(Numeric) << Modeling Type(Continuous) << Format(Best, 12);
Column(dt, "DieY") << data type(Numeric) << Modeling Type(Continuous) << Format(Best, 12);
dt << select where(
1045 <= :DieX <= 1055 & 1221 <= :DieY <= 1228
| 1145 <= :DieX <= 1155 & 1221 <= :DieY <= 1228
| 1045 <= :DieX <= 1055 & 770 <= :DieY <= 778
| 1145 <= :DieX <= 1155 & 770 <= :DieY <= 778
);
dt_subset = dt << subset(output table("Defects"), selected rows(1), Selected Columns(0));
-Jarmo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: script to subset selected rows
Thank you!