Hi, I'm trying to adapt this solution: https://community.jmp.com/t5/Discussions/Create-a-associative-array-from-unique-selected-rows-and-row/td-p/257860
using Select Where instead of Select Rows.
dt1 << Select Where( :Test == "Fail" );
I would like to create an array of the columns Age and Class for all the selected rows. Selected Rows doesn't seem to work and the Script Index Guide isn't clear on what object Select Where returns.
Thank you
Thank you that works. I find the documentation quite difficult to navigate.
maybe something like this
dt = Open( "$sample_data/big class.jmp" );
rows = dt << getrowswhere( 13 <= age <= 15 );
matrix = dt[rows, {height, weight}];
I don't think <Re: How to pass data from Select Where to array
Yes, so when I use:
dt1 << Select Where( :Test == "Fail" );
In the data table these rows appear as selected (highlighted in blue), the data table has columns Age and Class so I would like to create an array in pairs for all the selected rows.
Then I want to use the array in pairs to hide and exclude all rows where Age and Class are equal to one of the pairs.
e.g. if one of the rows where Test = Fail has Age = 14 and Class = 2, I would want to store the values ( (14,2), ... , ) in an array and then all rows where Age = 14 and Class = 2 I want to hide and exclude.
Could you provide clear example about what you want to do? The linked topic doesn't seem to have Test, Age or Class mentioned anywhere. You want to select rows based on something and then get values based on that selection on some columns?