こんにちは、
Join table 関数を試してみましたが、一度に 1 つずつ結合できると思います (例: dt1 と dt2 の結合)。出力テーブル (dtnew) が得られます。 現在出力されているテーブル (例: dtnew) を使用して別のテーブル (例: dt3) と結合するにはどうすればよいですか。
ありがとう。
JMP バージョン 13 の仮想結合機能によって対処される主な顧客主導のニーズの 1 つは、メモリの節約フットプリントでした。 これがあなたの状況にうまく機能することをとても嬉しく思います。
これが意図しているかどうかはわかりませんが、複数のテーブルを結合することが目的で、JMP 13 を使用している場合は、[テーブル] ドロップダウンに移動して、[JMP クエリ ビルダー] を選択できます。そこから、結合のスクリプトを作成する代わりに、一度に最大 60 個のテーブルを結合できます。
HTH
ここでは、結合ごとに個別のテーブルを作成する 1 つの方法を示します。
Names Default To Here( 1 );
// Create the original table
dtBase = New Table( "Base Table",
Add Rows( 10 ),
New Column( "name",
character,
Set Values( {"KATIE", "LOUISE", "JANE", "JACLYN", "LILLIE", "TIM", "JAMES", "ROBERT", "BARBARA", "ALICE"} )
),
New Column( "age", Set Values( [12, 12, 12, 12, 12, 12, 12, 12, 13, 13] ) ),
New Column( "sex", character, Set Values( {"F", "F", "F", "F", "F", "M", "M", "M", "F", "F"} ) )
);
// Create a second table
dt2 = New Table( "Height",
Add Rows( 10 ),
New Column( "name",
character,
Set Values( {"KATIE", "LOUISE", "JANE", "JACLYN", "LILLIE", "TIM", "JAMES", "ROBERT", "BARBARA", "ALICE"} )
),
New Column( "height", Set Values( [59, 61, 55, 66, 52, 60, 61, 51, 60, 61] ) ),
Set Label Columns( :name )
);
// Join the two tables and create a reference to the new table
dtjoined = dtBase << Join(
With( dt2 ),
By Matching Columns( :name = :name ),
Drop multiples( 0, 0 ),
Include Nonmatches( 0, 0 ),
Preserve main table order( 1 ),
Merge same name columns( 1 ),
Match Flag( 0 )
);
// Close the nolonger needed tables and set the base table reference to the new table
Close( dtBase, nosave );
Close( dt2, nosave );
dtBase = dtjoined;
// Create another table to be joined
dt3 = New Table( "Weight",
Add Rows( 10 ),
New Column( "name",
character,
Set Values( {"KATIE", "LOUISE", "JANE", "JACLYN", "LILLIE", "TIM", "JAMES", "ROBERT", "BARBARA", "ALICE"} )
),
New Column( "weight", Set Values( [95, 123, 74, 145, 64, 84, 128, 79, 112, 107] ) ),
Set Label Columns( :name )
);
// Join the new table
dtjoined = dtBase << Join(
With( dt3 ),
By Matching Columns( :name = :name ),
Drop multiples( 0, 0 ),
Include Nonmatches( 0, 0 ),
Preserve main table order( 1 ),
Merge same name columns( 1 ),
Match Flag( 0 )
);
// Close the nolonger needed tables and set the base table reference to the new table
Close( dtBase, nosave );
Close( dt3, nosave );
dtBase = dtjoined;