回复:公式这是我想出的公式,似乎有效。
If( Row() == 1,
value = 1;
counter = 1;
);
If( :X__1 != Lag( :X__1 ),
counter = 1;
While( :X__1 == :X__1[Row() + counter] | Row() + counter == N Rows( Current Data Table() ), counter++ );
value = counter;
,
value = .
);
value;
回复:公式你好,
这很棒!
你能告诉我这是什么意思。
如果(:X__1!=滞后(:X__1),
...
计数器= 1; While(:X__1 ==:X__1 [Row()+ counter] | Row()+ counter == N行(当前数据表()),计数器++);
值=计数器;
,
值=。
);
值;
在哪里可以阅读或了解它?
非常感谢!
回复:公式有关脚本中函数和语句的所有信息,都可以在“帮助”下拉菜单下的“脚本指南”中找到。
Help ==> JMP文档库脚本指南
我希望以下内容有助于理解公式
// The entire script will be run for each row in the
// in the data table
// On row 1 set default values
If( Row() == 1,
value = 1;
counter = 1;
);
// If the value of X__1 has changed check to see if
// more than one row has this new value of X__1
If( :X__1 != Lag( :X__1 ),
counter = 1;
While(
:X__1 == :X__1[Row() + counter]
|
Row() + counter == N Rows( Current Data Table() ),
counter
++);
value = counter;
,
// If this is not a row that has a new value of X__1
// then set the value to a missing value
value = .
);
// A JMP formula always takes the results of the last item
// processed, and makes that the value for the formula
// columns current row so by placing the variable that
// holds that value as the last item processed in the
// script, we ensure the correct value is placed into
// the data table
value;
式你好,
我想从文件中计算出每个人的连续系列的长度。
如何在JMP Pro中使用公式计算此值?
用手,我已经在“列顺序”中输入了一些顺序。
X_4 =序列
谢谢。