For the latest version of JMP Help, visit JMP.com/help.


Scripting Guide > Data Tables > Advanced Data Table Scripting > Vertically Concatenate Data Tables
Publication date: 05/05/2023

Vertically Concatenate Data Tables

The Concatenate message combines rows of several data tables top to bottom, vertically joining the rows.

dt << Concatenate( DataTableReferences,...,Keep Formulas,
	Output Table Name( "name" ) );

For example, if you have subsetted tables for males and females, you can put them back together using Concatenate:

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Select Where( :sex == "M" );
m = dt << Subset( Output Table Name( "M" ) );
dt << Invert Row Selection;
f = dt << Subset( Output Table Name( "F" ) );
both = m << Concatenate( f, Output Table Name( "Both" ) );

Or, instead of creating a new table containing all the concatenated data, you can append all the data to the current data table:

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Select Where( :sex == "M" );
m = dt << Subset( Output Table Name( "M" ) );
dt << Invert Row Selection;
f = dt << Subset( Output Table Name( "F" ) );
both = dt << Concatenate( m, f, "Append to First Table" );
Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).