How to calculate the unique number of a column through the memory array?I tried to use the following code to find this result.
Does the expert have a faster method?
Thanks!
Scripting回复: 如何通过内存数组计算出某列的不重复个数?dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
ar = dt << GetAsMatrix( 2 );
nn = Matrix( Associative Array( ar[0, 1] ) << getKeys );
rh = N Row( nn );
回复: 如何通过内存数组计算出某列的不重复个数?I often use Summary under Tables to get unique items. The pro is that we have good reasons to believe the underlying implementation is highly optimized. The con is that the approach has to generate a new table, which might be a non-negligible overhead.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
sumdt = dt << Summary(
Group( :age ),
Freq( "None" ),
Weight( "None" )
);
rh = nrow(sumdt);
close(sumdt,nosave);
Reply: How to calculate the unique number of a column through the memory array?Thanks for the help of the experts. Although this answer is not what I want.