In JSL, with rows already selected, how do I select a subset of those cells which are in a columnIn JSL, with rows already selected, how do I select a subset of those cells which are in a column.
For instance, if rows 4, 12, 180, and 205 are already selected (for example), how do I subselect just the overlap cells of that and a certain column (column 10 for example) or columns (10,12 and 17 say).
Re: In JSL, with rows already selected, how do I select a subset of those cells which are in a columAll of the selected rows can be set with one statement
:age[(dt << get selected rows)] = 12;
In the above statement, all rows that have been selected, will be set to 12
Re: In JSL, with rows already selected, how do I select a subset of those cells which are in a columThe selected rows form a row-matrix that can be used to subset a column:
rows = dt << get selected rows;
subsetValues = Column(10)[rows];
Re: In JSL, with rows already selected, how do I select a subset of those cells which are in a columah ... so the [2] will refer to the 2nd selected row
Re: In JSL, with rows already selected, how do I select a subset of those cells which are in a columthis is great ... thanks!
I want to place the value "1" in a certain column for which rows have been selected by the Process Capability --> Select out of spec values option
for each out of spec value in column A, I want to place a "1" in same row of column B.
Re: In JSL, with rows already selected, how do I select a subset of those cells which are in a columI am not sure that @julian or @uday_guntupalli are interpreting your question properly. What I believe you are asking, is "How do you reference the selected rows for a specific column, or set of columns.
JMP allows one to access any given cell by the column name or number, and the row number. Selected rows can be accessed by getting back from JMP a list of the rows that have been selected. Below is a little script that shows some of the uses
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
dt << select where( :Age > 15 );
// Examples
Show( dt << get selected rows );
Show( :name[dt << get selected rows] );
Show( :Name[(dt << get selected rows)[2]],
:age[(dt << get selected rows)[2]] );
Re: In JSL, with rows already selected, how do I select a subset of those cells which are in a columHi @galactus3000,
Select Where() allows you to extend, restrict, or clear previous selections:
Select Where( condition, <CURRENT selection=""> );</CURRENT>
For your situation, it sounds like you'll want to restrict to your previously selected rows.
dt = Open("$SAMPLE_DATA\Big Class.jmp");
dt << Select Where( :age>14 );
Wait(1);
dt << Select Where( :sex=="F", Current Selection( "restrict" ));
I hope this helps!
@julian
Re: In JSL, with rows already selected, how do I select a subset of those cells which are in a colum@galactus3000,
You can leverage the "restrict" function similar to how extend has been used below.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Select Rows( [5, 7, 8, 10, 15] ); // For demo purpose only
dt << Label( 1 );
dt << Clear Select;
Wait( 2 );
dt << Select Labeled;
dt << Select Where(:age > 12,"extend");
I missed the subselect part until I saw @julian's post.