cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Get the free JMP Student Edition for qualified students and instructors at degree granting institutions.
Choose Language Hide Translation Bar
View Original Published Thread

How to extract repeated data in a multi-column matrix?

lala
Level VIII

2022-07-29_18-43-04.pngThanks!

 

 

2 REPLIES 2
lala
Level VIII


Re: How to extract repeated data in a multi-column matrix?

The height and weight columns were also compared. Thanks!
txnelson
Super User


Re: How to extract repeated data in a multi-column matrix?

Here is one way of retrieving the frequency counts from a matrix

Names Default To Here( 1 );
dt = // Open Data Table: big class.jmp
// → Data Table( "big class" )
Open( "$SAMPLE_DATA/big class.jmp" );;
ar = dt << getasmatrix( {4, 5} );


dt_freq = New Table( "dt_freq", private, New Column( "groups" ) );
dt_freq:groups << set values( ar[0, 2] );
Summarize( dt_freq, Bygroup = by( :groups ), ngroups = Count( :groups ) );
Close( dt_freq, nosave );
For Each( {value, index}, Bygroup, Bygroup[index] = Num( Bygroup[index] ) );
bygroup = Matrix( bygroup );
theReturned = bygroup || ngroups;
Jim