cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

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

<< Get Values from a Column without subsetting each set of row selection.

So, I have a big dataset. Currently I am selecting few rows for each condition, subsetting the data and run  << get values (im My JSL script)  to move data to defined LIST.  This process is taking significant time, because as i mentioned dataset is huge.

I want to know, if there is a way to  << get values from a column for the selected rows without doing subset everytime. \

Or I have to subset every time to  << get values from  desired ROW\Column.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Jeff_Perkinson
Community Manager Community Manager

Re: << Get Values from a Column without subsetting each set of row selection.

You can get the value of a column for a given row by subscripting to that row.

 

For example:

 

dt=open("$SAMPLE_DATA\Big Class.jmp");
:name[1];

Will return "Katie" which is the name in the first row.

 

 

Likewise, you can use a matrix for the subscript.

 

dt=open("$SAMPLE_DATA\Big Class.jmp");
:name[[2,3,4]];

That returns: 

{"LOUISE", "JANE", "JACLYN"}

You can probably see where this is headed. The <<Get Selected Rows message returns a matrix, so you can use that to subscript directly to the column.

dt=open("$SAMPLE_DATA\Big Class.jmp");
rows=dt<<get selected rows;
:name[rows];

 

-Jeff

View solution in original post

2 REPLIES 2
Jeff_Perkinson
Community Manager Community Manager

Re: << Get Values from a Column without subsetting each set of row selection.

You can get the value of a column for a given row by subscripting to that row.

 

For example:

 

dt=open("$SAMPLE_DATA\Big Class.jmp");
:name[1];

Will return "Katie" which is the name in the first row.

 

 

Likewise, you can use a matrix for the subscript.

 

dt=open("$SAMPLE_DATA\Big Class.jmp");
:name[[2,3,4]];

That returns: 

{"LOUISE", "JANE", "JACLYN"}

You can probably see where this is headed. The <<Get Selected Rows message returns a matrix, so you can use that to subscript directly to the column.

dt=open("$SAMPLE_DATA\Big Class.jmp");
rows=dt<<get selected rows;
:name[rows];

 

-Jeff
jump
Level II

Re: << Get Values from a Column without subsetting each set of row selection.

Yes, thanks you. will try that.

Recommended Articles