Scripting Guide > Programming Methods > Script By Groups
발행일 : 03/10/2025

Script By Groups

By group arguments are supported for these JSL functions: ColMean(), ColStdDev(), ColNumber(), ColNMissing(), ColMinimum(), ColMaximum().

Any number of By arguments can be specified, and you can use expressions for the By arguments. By arguments must be used in a column formula, or in the context of ForEachRow(). The first argument can also be a general numeric expression.

Here is an example:

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << New Column( "Mean of height by sex", Numeric, Formula( Col Mean( :height, :sex ) ) );
 
dt << New Column( "Minimum of height by sex and age",
	Numeric,
	Formula( Col Minimum( :height, :sex, :age ) )
);
 
dt << Distribution( Continuous Distribution( Column( :height ) ), By( :sex ) );
 
dt << Tabulate(
	Show Control Panel( 0 ),
	Add Table(
		Column Table(
			Analysis Columns( :height ),
			Statistics( Mean, N, Std Dev, Min, Max, N Missing )
		),
		Row Table( Grouping Columns( :age, :sex ) )
	)
);
더 많은 정보를 원하십니까? 질문이 있습니까? JMP 사용자 커뮤니티에서 답변 받기 (community.jmp.com).