저널의 루프를 통해 개요 상자에서 데이터 추출안녕하세요 여러분,
저는 제 데이터를 인쇄해 주는 스크립트를 만들려고 합니다. 저는 각 개요 상자에 대한 데이터를 인쇄하고 싶은 저널이 있습니다(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: 저널의 루프를 통해 개요 상자에서 데이터 추출저널로 만들기 전에 보고서에 액세스하는 대신 저널을 사용하는 데에는 특정한 이유가 있습니까? 또한 Make Combined Data Table을 사용하여 얻을 수 있는 테이블에서 보고서를 작성해 보셨습니까?


Re: 저널의 루프를 통해 개요 상자에서 데이터 추출그리고 충분한 인내심이 있다면(저는 Tabulate를 사용하지 않습니다...) Tabulate를 사용하여 꽤 괜찮은 보고서를 만들 수 있을 것입니다.



여기에는 JMP17 또는 JMP18(패킹)이 필요합니다.

Re: 저널의 루프를 통해 개요 상자에서 데이터 추출귀하의 저널이 다음과 같이 참조된다는 점을 감안할 때
rpt = Current Journal();
그리고 당신은 사용하고 있습니다
// Get the number of outline boxes
numOutlineBoxes = nitems(rpt);
OutlineBox의 개수를 구하려면 항상 1을 반환합니다. 모든 OutlineBox의 목록을 반환하려면 Xpath()를 사용해야 합니다.
numOutlineBoxes = nitems(rpt << xpath( "//OutlineBox" )) ;
그러나 60개의 개요 상자를 찾을 것입니다. 따라서 이를 좁히려면 기본 헤더 목록을 가져올 수 있습니다.
majorrptList= rpt << xpath( "//OutlineBox[contains(text(),'Variability Gauge')]" )
그러면 각 By 그룹 출력에 대한 포인터가 제공됩니다.
Re: 저널의 루프를 통해 개요 상자에서 데이터 추출안녕하세요 Jthi님,
답변 감사합니다. report 대신 journal을 사용한 이유는 standard deviation outline 상자가 여전히 있는 report를 저장할 수 없기 때문입니다. 그래서 journal에 저장해야 했습니다.
이 옵션을 사용해서 결합된 표로 만드는 것에 대해 조사해 볼게요.
감사합니다,
줄리
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 테스트 스크립트)를 첨부했습니다. 살펴보고 혼란의 이유를 찾을 수 있기를 바랍니다.:)