모두들 안녕,
Pareto 함수에 대한 호출에서 "By"를 스크립팅하고 싶습니다.나는 Pareto 플롯이 다음과 같이 "By"로 표시된다는 것을 알았습니다.
Pareto Plot(Cause( :SBIN_NAM ), X( :Insertion ), Where( :lot_id == "4LU31HFN00_E95029" ))
"위치"는 파레토 함수 대화 상자의 "기준" 필드를 구현합니다.
그래서 "lot_id"라는 열로 Pareto 플롯을 플롯하려는 JMP 스크립트가 있습니다.그러나 스크립트가 일반화되기를 원하므로 "lot_id"가 미리 무엇인지 알 수 없습니다.따라서 "where"로 전달되는 값은 데이터 테이블에 실제로 존재하는 lot_id에 따라 런타임에 결정됩니다.
처음에는 데이터 테이블에 "listOfLotIDs"라고 하는 모든 lot_id의 목록을 만들고 상식적인 접근을 시도했습니다.이것은 작동하지 않았습니다:
For( i = 1, i <= N Items( listOfLotIDs ), i++,
Pareto Plot( Cause( :SBIN_NAM ), X( :Insertion ), Per Unit Rates( 1 ), Show cumulative Percent Curve( 0 ), Where(:lot_id == listOfLotIDs[i] ));
);
얼마 후 나는 내 코드가 작동하지 않는다고 믿게 되었습니다. 어떤 이유로 인해 "where" 함수에 전달된 값은 다음과 같이 괄호 안에 정의되어야 하기 때문입니다. 실제 인용 부호 - 그냥 문자열 변수로 전달할 수 없습니다.그래서 다른 변형을 시도했습니다.
For( i = 1, i <= N Items( listOfLotIDs ), i++,
sEval = "Pareto Plot( Cause( :SBIN_NAM ), X( :Insertion ), Per Unit Rates( 1 ), Show cumulative Percent Curve( 0 ), Where(:lot_id == \!"" || listOfLotIDs[i] || "\!"))";
eval(Parse(sEval));
print("PRINT OUTPUT: " || sEval);
);
"parse" 기능이 JMP 스크립트를 컴파일하고 "eval" 기능이 컴파일된 JMP 스크립트를 실행한다고 생각합니까? 그러나 이것도 작동하지 않습니다.문자열을 올바르게 조립했는지 확인하기 위해 문자열의 print()를 포함했습니다.로그는 다음과 같이 말합니다.
Error for Pareto Plot on data table 'Subset of 4LU31HFN00_E95029,4LU31HFO00_E93847,4LU31HFP00_E93 20 Where(lot_id == -4LU31HFN00_E95029-)' : One or more columns have missing values on all rows.
"PRINT OUTPUT: Pareto Plot( Cause( :SBIN_NAM ), X( :Insertion ), Per Unit Rates( 1 ), Show cumulative Percent Curve( 0 ), Where(:lot_id == \!"4LU31HFN00_E95029\!"))"
Error for Pareto Plot on data table 'Subset of 4LU31HFN00_E95029,4LU31HFO00_E93847,4LU31HFP00_E93 20 Where(lot_id == -4LU31HFO00_E93847-)' : One or more columns have missing values on all rows.
"PRINT OUTPUT: Pareto Plot( Cause( :SBIN_NAM ), X( :Insertion ), Per Unit Rates( 1 ), Show cumulative Percent Curve( 0 ), Where(:lot_id == \!"4LU31HFO00_E93847\!"))"
Error for Pareto Plot on data table 'Subset of 4LU31HFN00_E95029,4LU31HFO00_E93847,4LU31HFP00_E93 20 Where(lot_id == -4LU31HFP00_E93981-)' : One or more columns have missing values on all rows.
"PRINT OUTPUT: Pareto Plot( Cause( :SBIN_NAM ), X( :Insertion ), Per Unit Rates( 1 ), Show cumulative Percent Curve( 0 ), Where(:lot_id == \!"4LU31HFP00_E93981\!"))"
Error for Pareto Plot on data table 'Subset of 4LU31HFN00_E95029,4LU31HFO00_E93847,4LU31HFP00_E93 20 Where(lot_id == -4LU31HFQ00_E95030-)' : One or more columns have missing values on all rows.
"PRINT OUTPUT: Pareto Plot( Cause( :SBIN_NAM ), X( :Insertion ), Per Unit Rates( 1 ), Show cumulative Percent Curve( 0 ), Where(:lot_id == \!"4LU31HFQ00_E95030\!"))"
Error for Pareto Plot on data table 'Subset of 4LU31HFN00_E95029,4LU31HFO00_E93847,4LU31HFP00_E93 20 Where(lot_id == -4LU31HFR00_E94699-)' : One or more columns have missing values on all rows.
"PRINT OUTPUT: Pareto Plot( Cause( :SBIN_NAM ), X( :Insertion ), Per Unit Rates( 1 ), Show cumulative Percent Curve( 0 ), Where(:lot_id == \!"4LU31HFR00_E94699\!"))"
그럼 도대체 뭐가 잘못된 걸까요?이스케이프된 따옴표(\!")가 어떻게 대시 "-"로 바뀌었습니까?!도와주세요.
그건 그렇고, 포럼은 내 메시지 본문에서 "잘못된 HTML"을 제거했다고 주장하고 있습니다. 일부 코드 또는 오류 메시지가 깨져 보일 수 있습니다.
안녕하세요,
오류 메시지에 따르면 이 문제는 Where 문이 아니라 데이터 테이블의 누락된 값 구조와 관련이 있을 수 있습니다. 데이터 또는 데이터의 모의 버전을 공유할 수 있습니까?
최상의,
TS