cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • See how to design an experiment, explore factor-response relationships, assess tradeoffs, and ID best settings. Register for Sep. 11 Mastering JMP.

JMP Wish List

We want to hear your ideas for improving JMP. Share them here.
Choose Language Hide Translation Bar
0 Kudos

Summerize/Summary aggregation function for character data. Concat Charcter Vector into a Scalar (by)

Generalize the code to work with Summerize/Summary.

 

dt = current data table();

Summarize( g = By(:Column 0, :Column 1 ) );

For( i = 1, i <= N Items( g[1] ), i++,

   r = dt << Get Rows Where( dt:Column 0 == g[1][i] & dt:Column 1 == g[2][i]);

   dt:Column 3[r] = Concat Items( dt:Column 2[r], "_" );

);

nt = dt << Summary( Group( :Column 0, :Column 1, :Column 3 ) );

3 Comments
Ryan_Gilmore
Community Manager
Status changed to: Archived
We are archiving this request. If this is still important please comment with additional details and we will reopen. Thank you!
hogi
Level XIII

very useful :)

Up to now, I used Split to sort the entries, combine them and merge them back to the main table:

Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

//-------- dt << new column ("rank", Formula( Col Rank( :name, :age ) )); // put names next to each other, grouped by age DTsplit=dt<< Split( Split By( :rank), Split( :name ), Group( :age ) ); // Combine columns to a linge column DTsplit << Combine Columns( columns( :"1"n, :"2"n, :"3"n, :"4"n, :"5"n, :"6"n, :"7"n, :"8"n, :"9"n, :"10"n, :"11"n, :"12"n ), Column Name( "allNames" ), Delimiter( "," ) );

//----- // Update data tables dt<< Update( With( DTsplit ), Match Columns( :age = :age ), Add Columns from Update Table( :allNames ), Replace Columns in Main Table( None ) );

to get:

hogi_0-1689538145514.pnghogi_0-1689538145514.png

 

If Summarize had an option to concatenate strings, the whole part between the //---- could be replaced by a simple Summarize.

hogi
Level XIII