hello,
i need join with a script 2 data tables and select output columns for a new data table.
Can you help me ?
Best regards,
Anthony
Once you generate the table - there will be a "source" with a green button which looks like this .
Right click and "Edit" to get the script that JMP generated.
Hello @AnthonyS, There are a couple of ways to acheive what you want.
1. By using the JMP Scripting Language (JSL)
2. By using the click and point interactive interface in JMP
I will show how to do both in my response and feel free to ask any questions.
Approach 1 :
// Open Sample Data Tables dt1 = Open( "$SAMPLE_DATA/Air Traffic.jmp" ); dt2 = Open( "$SAMPLE_DATA/Airline Delays.jmp" ); // Join Tables dt3 = dt1 << Join(With(dt2 ), Select( :Airline, :Carrier Code, :Flight Number, :Tail Number ), SelectWith( :Arrival Delay, :Distance ), By Matching Columns( :Airline = :Airline ), Drop multiples( 1, 1 ), Include Nonmatches( 0, 0 ), Preserve main table order( 1 ) );
Approach 2 : When you open a data table in JMP, navigate to Tables > Join , when you click on the Join you will see the following screen - this enables you to chose the tables with which you want to perform the join and also allows you to select columns for the joined table.
thx
My problème in that i need select columns in data table joint (Reference), but the active data table is the last oppenin (Repeatablility).
how i can specify the active data table in the join fonction?
my script is in attachment
@AnthonyS, Please look at my previous response. If you were to select interactively , at the end of the Join Platfrom there is an option that allows you to select columns from both tables during the join. The same concept applies if you were scripting.
Yes but in your example you select just the "Air Traffic" Columns but i need select the "Airline Delays" columns too.
Does this script help you?
Pre = Open( "Preliminary.jmp" ); Repeat = Open( "Repeatability.jmp" ); Ref = Repeat << join( With( Pre ), Output Table Name( "Reference" ), Select( "SampleID-W", "Repeatability MEAN_BRIDGE_RATIO" ) );
Thx Jim,
but i already tried this script unsuccessful.