tcR (version 1.1)

set.rank: Set new columns "Rank" and "Index".

Description

Set new columns "Rank" and "Index":

set.rank <==> .data$Rank = rank(.data[, .col], ties.method = 'average')

set.index <==> .data$Index = 1:nrow(.data) in a sorted data frame by .col

Usage

set.rank(.data, .col = "Read.count")

Arguments

.data
Data frame or list with data frames.
.col
Character vector with name of the column to use for ranking or indexing.

Value

  • Data frame with new column "Rank" or "Index" or list with such data frames.