- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Invert Col Rank Functionality
All,
Is there a way to invert Col Rank() functionality especially when using with a By Variable i.e. by default Col Rank() assigns 1 the lowest value in the group. However, I would like it to assign "1" the highest value similar to the Sort Argument allowing a "descending" flag.
Best
Uday
Uday
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Invert Col Rank Functionality
Here is a simple example of how to do it
Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
New Column( "Rank Height",
Formula(
Col Rank( :height, <<tie( "average" ) )
)
);
New Column( "Rank Height by age",
Formula( col number(:height, :age)+1-Col Rank( :height, :age ) )
);
Jim
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Invert Col Rank Functionality
Here is a simple example of how to do it
Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
New Column( "Rank Height",
Formula(
Col Rank( :height, <<tie( "average" ) )
)
);
New Column( "Rank Height by age",
Formula( col number(:height, :age)+1-Col Rank( :height, :age ) )
);
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Invert Col Rank Functionality
Thanks for the quick turn around Jim.
Probably, worth requesting this a feature request for future releases.
Best
Uday
Uday