utilsCalculateRank | R Documentation |
Calculates the ranking of a given column.
utilsCalculateRank(df, nameCol)
df |
A DataFrame. |
nameCol |
The name of the column to be ranked. Note that this parameter needs to be specified as there is no default value. |
Returns a new df
that has an additional column with
the rankings of the column specified by nameCol
.
Jochen Staudacher jochen.staudacher@hs-kempten.de
SRDInput <- data.frame(
A=c(32, 52, 44, 44, 47),
B=c(73, 75, 65, 76, 70),
C=c(60, 59, 57, 55, 60),
D=c(35, 24, 44, 83, 47),
E=c(41, 52, 46, 50, 65))
columnName <- "A"
rSRD::utilsCalculateRank(SRDInput,columnName)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.