cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

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

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

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

 

 

2 REPLIES 2
lala
Level IX

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

Recommended Articles