I am new to Rand hope someone can help me with the following:
regarding the command below:
x$rank <- ave(x$fin, x$unique,FUN=rank)
The command works fine, but I want the order x$rankto reverse, so basically, for example, the highest value x$finshows its rank as "10", I need a rank for the largest value should be "1".
In addition, I can have more than one field as a second argument (currently x$unique) if there are multiple fields to make the string unique. If so, how would I structure it.
Bal
source
share