File: set.rank.Rd

package info (click to toggle)
r-cran-tcr 2.3.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, trixie
  • size: 2,316 kB
  • sloc: cpp: 187; makefile: 5
file content (24 lines) | stat: -rw-r--r-- 676 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dataproc.R
\name{set.rank}
\alias{set.rank}
\alias{set.index}
\title{Set new columns "Rank" and "Index".}
\usage{
set.rank(.data, .col = "Read.count")
}
\arguments{
\item{.data}{Data frame or list with data frames.}

\item{.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.
}
\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 \code{.col}
}