很抱歉,但是我不完全理解您要做什么。 希望继续对话,并为您提供一些可供审查的方法,下面我有一些JSL,它创建了一个与您的表相似的数据表,并使用3种不同的公式使用不同的计算均值的方法。 看一看,看看它是否能满足您的需求,如果不能,那么您可以更确切地说明要计算的内容吗?
New Table( "Example",
Add Rows( 4 ),
New Column( "Label",
Character,
"Nominal",
Set Values( {"Dry", "Wet", "outlet Dry", "Outlet Wet"} )
),
New Column( "a",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [80, 67, 57, 55] ),
Set Display Width( 47 )
),
New Column( "b",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [79, 66, 59, 57] )
),
New Column( "c",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [88, 77, 66, 55] )
),
New Column( "One",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
dt = Current Data Table();
Mean( dt[Row(), Index( 2, 4 )] );
)
),
New Column( "two",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
dt = Current Data Table();
Mean( dt[Index( 3, 4 ), Index( 2, 4 )] );
)
),
New Column( "three",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
dt = Current Data Table();
theColumns = dt << get column names( numeric );
Remove From( theColumns, 4, 2 );
Mean( theColumns );
)
)
)