透過日誌中的循環從大綱框中提取數據大家好,
我正在嘗試製作一個為我列印資料的腳本。我有一本日記,我想在其中列印每個大綱框的資料(請參閱日記 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分印重複性和中間值
我希望你能幫我解決這個問題。
此致,
朱莉
自動化和腳本編寫基礎資料分析與建模資料存取回覆:透過日誌中的循環從大綱框中提取數據在將報告製成期刊之前使用期刊而不是訪問報告有什麼具體原因嗎?您是否也嘗試過使用「建立組合資料表」所獲得的表格建立報表?


回覆:透過日誌中的循環從大綱框中提取數據然後,如果您有足夠的耐心(我不喜歡 Tabulate...),您也許可以使用 tabulate 建立相當不錯的報告



這需要JMP17或JMP18(包裝)

回覆:透過日誌中的循環從大綱框中提取數據鑑於您的日記被引用為
rpt = Current Journal();
你正在使用
// Get the number of outline boxes
numOutlineBoxes = nitems(rpt);
要取得 OutlineBox 的數量,它將始終傳回 1。
numOutlineBoxes = nitems(rpt << xpath( "//OutlineBox" )) ;
但是它會找到 60 個輪廓框。因此,為了縮小範圍,您可以使用以下命令來獲取主要標頭的列表
majorrptList= rpt << xpath( "//OutlineBox[contains(text(),'Variability Gauge')]" )
這將為您提供指向每個按組輸出的指針
回覆:透過日誌中的循環從大綱框中提取數據嗨,Jthi,
感謝你的回覆。使用日誌而不是報告的原因是因為我無法保存仍包含標準差大綱框的報告。因此,我必須將其保存到日記中。
我將嘗試研究有關將其製作為組合表的選項。
此致,
朱莉
回覆:透過日誌中的循環從大綱框中提取數據嗨吉姆,
感謝你的回覆。我已經嘗試過這個,我在其中添加了從 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 測試腳本與組合表)。希望大家看一下,能否找到混亂的原因:)