レベル: 初級
Mike Muhlada、JMP 開発テスター、SAS
オードリー・シュル、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_);