Dear Group,kinldy, I have the following data frame df id value1 1 4 2 1 4 3 1 6 4 1 6 5 2 1.5 6 2 2.5 7 2 2.5 8 2 2.5
add rank column regarding id coulmn where rank for the highest value would be 1, others rank would be the (value/ value of heighest)/ number of rows that took the same value thus the data frame should be id value Rank1 1 4 0.332 1 4 0.333 1 6 0.54 1 6 0.55 2 1.5 0.6 6 2 2.5 0.337 2 2.5 0.338 2 2.5 0.33 how to reach this resultthanks in advanceRagia [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.