使用 byCol 时如何调整 Col Rank() 以给出连续的数字我使用 Col Rank() 来计算运行次数:
Col Rank( :DateTime, :WaferID, <<TIE></TIE>
Each run may have multiple rows, which I can only separate by DateTime, so instead of writing long if statements, I used this formula.
The only thing that I don't like is the following. Let's say I have three rows generated per run, then my RunID column would look like:
and so on. I get where it comes from.
My question is - what would be the cleanest way to convert that to effectively 1, 1, 1, 2, 2, 2, 3, 3, 3?
<LINGO-LABS id="lingo-labs-782021" slang="en-US" mode="CREATE"><LINGO-LABEL>基础数据分析与建模</LINGO-LABEL></LINGO-LABS>回复:使用 byCol 时如何调整 Col Rank() 以给出连续的数字这个公式似乎可以满足你的要求。其他人可能有更巧妙的方法
As Constant( Summarize( bygroup = by( :waferID ) ) );
Contains( bygroup, Char( :waferID) );
回复:使用 byCol 时如何调整 Col Rank() 以给出连续的数字我通常使用 Col Cumulative Sum (或其他“技巧”)
Col Cumulative Sum(If(Row() == Col Min(Row(), :Column 1), 1,0))

愿望清单: 为 Ranking Tie 和 Col Rank 函数添加密集排名
回复:使用 byCol 时如何调整 Col Rank() 以给出连续的数字密集排名——我们经常需要它。
可能有些 JMP 用户不需要密集排序。对于需要它的用户来说,这总是感觉像在设置图灵机。
当然,每次成功时都会感觉很棒。当你能向遇到困难的同事展示这个技巧时,你总是感到自豪。
但想象一下,如果通过新的公式列可以获得密集排名,那将是多么酷!
所以,请大家花 5 秒钟时间,按照 Jarmos 的链接进入愿望清单并投票!
回复:使用 byCol 时如何调整 Col Rank() 以给出连续的数字如果您还有 5 秒,请投票支持:
https://community.jmp.com/t5/JMP-Wish-List/Col-N-Categories/idc-p/782236#M6115回复:使用 byCol 时如何调整 Col Rank() 以给出连续的数字非常感谢您的想法!
我的具体情况稍微复杂一些,我有一个或多个分类列(即运行不同的晶圆等)
因此最终的公式如下:
Col Cumulative Sum( If( Row() == Col Min( Row(), :Rank, :WaferID ), 1, 0 ), :WaferID )

..并且您必须将其保留为两个单独的列,但它有效!
谢谢!
回复:使用 byCol 时如何调整 Col Rank() 以给出连续的数字表必须按照您的排名变量进行排序,否则,如果排名 2 先于排名 1 - 在 RunID 中,它们将分别为 1 和 2(因为 Col Cumulative Sum,这就是原因)。
并不重要,但 RunID 顺序可能很重要。
回复:使用 byCol 时如何调整 Col Rank() 以给出连续的数字我认为这是在当前版本的 JMP(列累计和)中建立此类排名的最可靠方法,但正如您所说,数据必须排序。如果原始顺序很重要,请将行列添加到数据中,对数据进行排序,运行排名公式,删除公式,然后按行列重新排序。
回复:使用 byCol 时如何调整 Col Rank() 以给出连续的数字如果您不想添加 2 列:
Col Cumulative Sum( If( Row() == Col Min( Row(), :Date, :WaferID ), 1, 0 ), :WaferID )
如果您不想对数据表进行排序*):
Col Maximum( Col Rank( If( Row() == Col Min( Row(), :Date, :WaferID ),:Date), :WaferID) ,: Date, :WaferID )
如果你不想记住这个等式*):
Col Rank(:Date,:WaferID, <
<TIE></TIE>
<P><BR />*) <A href="https://community.jmp.com/t5/JMP-Wish-List/Sort-data-table-add-rows-concatenate-make-it-possible/m-p/724336#U724336" class="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea lia-fa-thread lia-fa" target="_blank">对数据表进行排序 + 添加行 + 连接 -> 使其成为可能</A></P> <P>**) 如果 Jarmo 的愿望获得足够的 Kudos: <A href="https://community.jmp.com/t5/JMP-Wish-List/Add-dense-ranking-to-Ranking-Tie-and-Col-Rank-functions/m-p/590079#U590079" class="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea lia-fa-thread lia-fa" target="_blank">为 Ranking Tie 和 Col Rank 函数添加密集排名</A></P>