cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
UserID16644
Level V

Concatenate from subset data table

Hi all,

I am trying to concatenate data (dt1)  from my subset tables (e.g subset by gender) 

dt1 also has a column name gender. However, when I try to concatenate the subset data into dt1, it kept on creating another column (gender, gender1, gender2) where the data from the subset tables are placed and not on the gender column on dt1.

How can I concatenate data from subset tables to the specified column?

3 REPLIES 3
markschwab
Level IV

Re: Concatenate from subset data table

Is Tables -> Update -> Match Columns able to achieve what you're trying to do?

UserID16644
Level V

Re: Concatenate from subset data table

Nope. Im trying to concatenate data from my subset table

ron_horne
Super User (Alumni)

Re: Concatenate from subset data table

Hi @UserID16644 

try the followoing script see if it behaves well

// Open Data Table: Big Class.jmp
Open( "$SAMPLE_DATA/Big Class.jmp" );

// Select matching cells
Data Table( "Big Class" ) << Select Where( :sex == "F" );

// Subset data table
// → Data Table( "Subset of Big Class" )
Data Table( "Big Class" ) << Select Where( :sex == "F" ) <<
Subset( Selected Rows( 1 ), Selected columns only( 0 ) );


// Concatenate tables
Data Table( "Big Class" ) << Concatenate(
	Data Table( "Subset of Big Class" ),
	Append to first table
);

if it is well behaved try to understand what are the differences from the other results.

the only time i get new columns created using concatenate is when column names do not match.

let us know if it works.

ron