- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Number of selected rows
In the lower left pane of a JMP data table there is a list with row information, including the number of currently selected cells.
Is there a JSL command that can retrieve that information directly? I can of course loop through all rows and count all selected cells. However, it may be more efficient to grab a number that JMP already seem to have calculated automatically.
I am asking because I am running a script that conditionally selects different sets of rows in a huge table and want a fast way to neglect sets with too few rows.
Is there a JSL command that can retrieve that information directly? I can of course loop through all rows and count all selected cells. However, it may be more efficient to grab a number that JMP already seem to have calculated automatically.
I am asking because I am running a script that conditionally selects different sets of rows in a huge table and want a fast way to neglect sets with too few rows.
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Number of selected rows
Created:
Apr 7, 2011 08:54 AM
| Last Modified: Jun 22, 2018 9:16 AM
(21878 views)
| Posted in reply to message from ms 04-06-2011
num_selected = nrows(dt << get selected rows);
4 REPLIES 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Number of selected rows
Created:
Apr 7, 2011 08:54 AM
| Last Modified: Jun 22, 2018 9:16 AM
(21879 views)
| Posted in reply to message from ms 04-06-2011
num_selected = nrows(dt << get selected rows);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Number of selected rows
Thanks! Just what I was looking for. Simple and elegant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Number of selected rows
Created:
Apr 19, 2016 04:44 PM
| Last Modified: Oct 18, 2016 7:26 PM
(18028 views)
| Posted in reply to message from pmroz 04-07-2011
hi, PMroz
I am trying to select certain rows in a table with a criteria and then delete them if the number of selected rows is greater than 0 as below but got the error as inserted pic.
if( (nrows(dtlist8<< get selected rows()))>0,
dtlist8 <<delete rows,
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Number of selected rows
Created:
Apr 20, 2016 09:17 AM
| Last Modified: Jun 22, 2018 9:17 AM
(18028 views)
| Posted in reply to message from robust1972 04-19-2016
What is dtlist8 pointing to? It seems like it isn't pointing to a table. The following code works:
dtlist8 = open("$sample_data\Big Class.jmp");
if( nrows(dtlist8 << get selected rows()) > 0,
dtlist8 << delete rows,
);