ジャーナルのループを介してアウトライン ボックスからデータを抽出するこんにちは、みんな、
データを印刷するスクリプトを作成しようとしています。ジャーナルがあり、各アウトライン ボックスのデータを印刷したいと考えています (journal data.jrn を参照してください)。
希望するデータ テーブルに到達するには、まだかなりの作業が足りないことは承知していますが、最初のハードルに遭遇しました。それは、1 つのアウトライン ボックスのみが印刷され、すべてが印刷されないことです。以下のスクリプトを参照してください。
// JMP version 16<BR />sd = currentdatatable();<BR />rpt = Current Journal();
// Get the number of outline boxes
numOutlineBoxes = nitems(rpt);
int = rep = sumfit = sumfitLL = sumfitUL = {};
sum = 0;
// Loop through each outline box
for (i = 1, i <= numOutlineBoxes, i++,
outlineBox = rpt[i];
sumfit = outlineBox[Outline Box( numOutlineBoxes )][Number Col Box( 1 )] << Get as Matrix;
sumfitLL = outlineBox[Outline Box( numOutlineBoxes )][Number Col Box( 3 )] << Get as Matrix;
sumfitUL = outlineBox[Outline Box( numOutlineBoxes )][Number Col Box( 4 )] << Get as Matrix;
sumfit_rep = Round( sumfit[2] , 3 );
sumfit_int = Round( sumfit[3] , 3 );
lowerCL_rep = Round( sumfitLL[2] , 3 );
upperCL_rep = Round( sumfitUL[2] , 3 );
lowerCL_int = Round( sumfitLL[3] , 3 );
upperCL_int = Round( sumfitUL[3] , 3 );
Insert Into( rep, Char( sumfit_rep ) || " [" || Char( lowerCL_rep ) || " ; " || Char( upperCL_rep ) || "]" );
Insert Into( int, Char ( sumfit_int ) || " [" || Char( lowerCL_int ) || " ; " || Char( upperCL_int ) || "]" );
// Get By Group column
//whereCol = Word( 2, ((rep << parent)[Text Box( 1 )]) << get text, ":=)" );
term = outlineBox[Outline Box( numOutlineBoxes )][String Col Box( 1 )] << Get();
sum = sum + 1
);
// Create the table
dlg = New Window( "Custom Report",
Outline Box( "Selected Values",
Lineup Box( N Col( 2 ), Text Box( "Factor of Interest: " ), Text Box( term[1] ) ),
Spacer Box( size( 0, 10 ) ),
tb = Table Box(
String Col Box( "Paramenter", testvalue ),
//String Col Box( whereCol, repeat(ByGroups, sum) ),
String Col Box( "Repeatability, " || term[1], rep ),
String Col Box( "Intermediate precision, " || term[2], int ),
)
)
);
tb << Set Shade Headings( 0 ); // Turn off shaded table headings.
tb << Set Column Borders( 1 ); // Turn off table column borders.
tb << Set row Borders( 1 );
tb << border( 1 );印刷は次のようになります。

最終段階では、パイントは次のようになると思います。

要約すると、修正する必要がある手順は次のとおりです。
1. すべてのアウトラインボックスが考慮されるようにループを動作させる
2. パラメータとバッチを含める
3. 実験室のAA/BBで繰り返し性と中間性を分割して印刷する
この件についてご協力いただければ幸いです。
よろしくお願いします、
ジュリー
自動化とスクリプト基本的なデータ分析とモデリングデータアクセスRe: ジャーナルのループを介してアウトライン ボックスからデータを抽出するレポートがジャーナルに作成される前にレポートにアクセスするのではなく、ジャーナルを使用する特別な理由があるのでしょうか? また、結合データ テーブルの作成を使用して取得できるテーブルからレポートを作成してみましたか?


Re: ジャーナルのループを介してアウトライン ボックスからデータを抽出するそして、十分な忍耐力があれば(私はTabulateにはないのですが...)、Tabulateを使ってかなりまともなレポートを作成できるかもしれません。



これにはJMP17またはJMP18(パッキング)が必要です

Re: ジャーナルのループを介してアウトライン ボックスからデータを抽出するあなたのジャーナルが次のように参照されていることを考えると
rpt = Current Journal();
そしてあなたは
// Get the number of outline boxes
numOutlineBoxes = nitems(rpt);
OutlineBoxes の数を取得すると、常に 1 が返されます。すべての OutlineBoxes のリストを返すには、Xpath() を使用する必要があります。
numOutlineBoxes = nitems(rpt << xpath( "//OutlineBox" )) ;
しかし、60個のアウトラインボックスが見つかります。これを絞り込むには、次の方法で主要なヘッダーのリストを取得できます。
majorrptList= rpt << xpath( "//OutlineBox[contains(text(),'Variability Gauge')]" )
これにより、グループ別出力のそれぞれへのポインタが表示されます。
Re: ジャーナルのループを介してアウトライン ボックスからデータを抽出するこんにちは、ジティさん
ご返信ありがとうございます。レポートではなくジャーナルが使用されている理由は、標準偏差のアウトライン ボックスが残っているレポートを保存できないためです。そのため、ジャーナルに保存する必要がありました。
結合テーブルにするためのこのオプションを検討してみます。
よろしくお願いします、
ジュリー
Re: ジャーナルのループを介してアウトライン ボックスからデータを抽出するこんにちは、ジムさん
ご返信ありがとうございます。numOutlineBoxes を次のように変更して試してみました。
majorrptList = rpt << xpath( "//OutlineBox[contains(text(),'Standard Deviations')]" );
The script saves information to sumfit_rep and sumfit_int, but it does not save to lowerCL_rep , upperCL_rep , lowerCL_int or upperCL_int during the part below:
sumfit = outlineBox[Outline Box( majorrptList )][Number Col Box( 1 )] << Get as Matrix;
sumfitLL = outlineBox[Outline Box( majorrptList )][Number Col Box( 3 )] << Get as Matrix;
sumfitUL = outlineBox[Outline Box( majorrptList )][Number Col Box( 4 )] << Get as Matrix;
sumfit_rep = Round( sumfit[2] , 3 );
sumfit_int = Round( sumfit[3] , 3 );
lowerCL_rep = Round( sumfitLL[2] , 3 );
upperCL_rep = Round( sumfitUL[2] , 3 );
lowerCL_int = Round( sumfitLL[3] , 3 );
upperCL_int = Round( sumfitUL[3] , 3 );
Insert Into( rep, Char( sumfit_rep ) || " [" || Char( lowerCL_rep ) || " ; " || Char( upperCL_rep ) || "]" );
Insert Into( int, Char ( sumfit_int ) || " [" || Char( lowerCL_int ) || " ; " || Char( upperCL_int ) || "]" );
ここからサンプル/バッチとパラメータに関する情報を含む必要なテーブルを取得する方法がわからないため、結合テーブルを作成してそこから抽出しようとしましたが、奇妙なことが起きて非常に混乱しています。結合テーブル (int rep テスト スクリプトの結合データ テーブル) とスクリプト (結合テーブルを含む int rep テスト スクリプト) を添付しました。ご覧になって、混乱の原因がわかるかどうか確認していただければ幸いです。:)