Create a rank per document id based on score.

create_rank_col(df)

create_rank_col_dplyr(df)

Arguments

df

A data.frame with columns "doc_id", "score".

Value

The input data.frame df with an additional column "rank".

Functions

  • create_rank_col_dplyr(): Variant with internal usage of dplyr rather than collapse library.