rankColumns: Rank columns in a dataset

View source: R/compare.R

rankColumnsR Documentation

Rank columns in a dataset

Description

Rank columns in a dataset

Usage

rankColumns(table, rankingInfo, rankByAscending = TRUE, sort = FALSE)

Arguments

table

Data table: data; first column must be identifiers

rankingInfo

Data table: boolean values of which rows to rank based on columns (column names to be ranked must exactly match those available in argument table); first column must be identifiers

rankByAscending

Boolean: rank values based on their ascending (TRUE) or descending (FALSE) order?

sort

Boolean: sort data based on rank product's rank (if multiple methods are available) or by available ranks

Details

The rank product's rank is calculated if more than one method is ranked.

Value

Data table with the contents of table and extra columns with respective rankings

Note

The first column of data and rankingInfo must contain common identifiers.


nuno-agostinho/cTRAP documentation built on March 28, 2024, 3:59 p.m.