레벨: 초보자
Mike Muhlada, SAS JMP 개발 테스터
Audrey Shull, SAS의 JMP 수석 개발 테스트 관리자
이 소개 데모에서는 예제를 통해 수식 편집기의 작동 방식을 설명하고, 일반적인 오류를 조사 및 수정하며, 수식 생성을 위한 모범 사례와 유용한 '요령'을 소개합니다. 드래그 앤 드롭, 단축키, 함수 버튼을 사용하여 수식을 만드는 방법을 포함하여 수식 작성기의 다양한 측면을 자세히 살펴보겠습니다. 예제를 진행하면서 유용한 함수에 대해 논의하고, 일반적인 실수를 파악하고 수정하는 등의 작업을 진행합니다. 다루는 모범 사례 주제에는 사용자 지정 형식, 데이터 '정리'를 위한 수식 사용, 열 변환, 문자열 조작, JMP 날짜 함수, 중간 열을 사용하여 더 복잡한 수식을 작성하는 방법 등이 포함됩니다. 특히 사용자 정의 함수, 결과 미리보기, '실시간' 수식 오류/경고 감지, 사용자 지정 가능한 함수 목록 등 JMP 14의 새로운 기능에 중점을 둘 것입니다.
// custom function
funcDef=function( {height, weight},
{Default Local},
(weight * 0.45) / (height * 0.025) ^ 2
);
description="This function calculates BMI, given a person's weight and height. Weight is presumed to be in pounds and Height is presumed to be in inches. The conversion to metric is done inside the function itself.";
// Examples can be multiple statements inside expr()
ex2=expr(
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
custom:BMI(:height[4], :weight[4])
);
parmHint1="Height in inches";
parmHint2="Weight in pounds";
//create function using variables
bmi_=New Custom Function("custom", "BMI", funcDef);
bmi_ << Description(description);
bmi_ << Prototype("custom:BMI(height,weight)");
bmi_ << Example("custom:BMI(72,225)");
// expr() Examples need to be passed inside NameExpr()
bmi_ << Example(NameExpr(ex2));
bmi_ << Parameter("Number", parmHint1);
bmi_ << Parameter("Number", parmHint2);
bmi_ << Formula Category( "Discovery" );
bmi_ << Scripting Index Category( "Frankfurt Functions" );
//add myNamespace:AddTen function to system
Add Custom Functions(bmi_);