cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Due to the recently reported Microsoft outage, users may be temporarily unable to access My JMP or experience a delay receiving their verification codes. If you have previously installed JMP on your computer, this outage should not impact your ability to access the software. My JMP services will be restored as soon as Microsoft resolves this issue.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
lala
Level IX

如何能不用循环的方式求出结果?

例如按身高的数值大于63的堆数:

 

这个堆数是指:当相邻行数连续大于63时计数为1、这样计数应该是有 8 

这个用循环的方式能得到结果、请教是否还有其它方式可以得到结果。谢谢!

 

2021-12-02_154024.png

3 REPLIES 3
jthi
Super User

Re: 如何能不用循环的方式求出结果?

Maybe something like this:

If(Row() == 1, cur_val = 1);
If(:height > 63 & Lag(:height) <= 63,
	cur_val
	++);
-Jarmo
lwx228
Level VIII

Re: 如何能不用循环的方式求出结果?

Sum(:height[Index(1,Row()-1)]<=63&:height[Index(2,Row())]>63)
lala
Level IX

Re: 如何能不用循环的方式求出结果?

当数据量很大时、两个专家的方法耗时方面是有较大差异的。再次感谢!

Recommended Articles