Subscribe Bookmark RSS Feed

[JMP] [JSL] Take column from a data table and stick it in another data table

antoinesofradir

Community Trekker

Joined:

Apr 26, 2013


Hi,

I use the function Tabulate in my original data table to create new column. JMP give me this colum in a new data table ...

I would like now to copy this new column in my original data table.

Can i do this in a script ?

Thanks for your help !

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

I usually use Update() to add columns from other tables.

here is a jsl example:

dt = Open( "$SAMPLE_DATA/Car Poll.jmp" );

dt_mean = (dt << Tabulate(

     Add Table(

         Column Table( Analysis Columns( :age ), Statistics( Mean ) ),

         Row Table( Grouping Columns( :sex, country ) )

     )

)) << Make Into Data Table;

dt << Update( With( dt_mean ), Match Columns( :sex = :sex, :country = country ) );

2 REPLIES
Solution

I usually use Update() to add columns from other tables.

here is a jsl example:

dt = Open( "$SAMPLE_DATA/Car Poll.jmp" );

dt_mean = (dt << Tabulate(

     Add Table(

         Column Table( Analysis Columns( :age ), Statistics( Mean ) ),

         Row Table( Grouping Columns( :sex, country ) )

     )

)) << Make Into Data Table;

dt << Update( With( dt_mean ), Match Columns( :sex = :sex, :country = country ) );

antoinesofradir

Community Trekker

Joined:

Apr 26, 2013

Thank you MS !