通过使用脚本比较与项目相关的多个参数来过滤行项目我附上了示例数据,我需要从中提取给定 PartID 产量最小的行。 我想使用脚本来做到这一点。
我需要为每个 PartID 执行此操作,然后有一个仅包含过滤行的表(即 [PartID]、[Parameter] [(min-) Yeild])。

请注意,我特意为 C 部分设置了相同的产量,因为我可能有类似的数据,并希望使用脚本处理此类问题。 我在 JMP13 上。
谢谢。
数据表脚本编写视窗回复:通过使用脚本比较与项目相关的多个参数来过滤行项目这是处理您的请求的一种方法:
Names Default To Here( 1 );
dt = Current Data Table();
Summarize( dt, thePartID = by( :PartID ), theMin = Minimum( :Parameter ) );
dt << clear select;
For( i = 1, i <= N Items( thePartID ), i++,
dt << select where(
:PartID == thePartID[i] & :Parameter == theMin[i],
current selection( "extend" )
)
);
dtSelected = dt << subset( selected rows(1), selected columns(0));
回复:通过使用脚本比较与项目相关的多个参数来过滤行项目谢谢。 直接运行你的脚本会给我以下错误
Column Must be Numeric in access or evaluation of 'Parameter' , :Parameter/*###*/
In the following script, error marked by /*###*/
dt = Current Data Table();
Summarize( dt, thePartID = by( :PartID ), theMin = Minimum( :Parameter/*###*/ ) );
dt << clear select;
For( i = 1, i <= N Items( thePartID ), i++,
dt << select where(
:PartID == thePartID[i] & :Parameter == theMin[i],
current selection( "extend" )
)
);
dtSelected = dt << subset( selected rows( 1 ), selected columns( 0 ) );
也许第三行应该是
Summarize( dt, thePartID = by( :PartID ), theMin = Minimum( :Yield) );
无论如何运行脚本给我上面的行。
Empty()
我附上了带有脚本的数据表。