% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/val2rank.R
\name{val2rank}
\alias{val2rank}
\title{Converting the values of a vector into their rank}
\usage{
val2rank(X, opt)
}
\arguments{
\item{X}{: vector to treat}

\item{opt}{: integer which gives the rule to follow in case of tied ranks (repeated values): if opt = 1, one returns the average rank, if opt = 2, one returns the corresponding rank in the series of the unique values, if opt = 3, return the max rank}
}
\value{
R : rank vector
}
\description{
converts the values of a vector into their rank
}
\examples{
# Definition of the parameters
X <- matrix(rexp(100), 100, 1)
opt <- 3
# Call the function
res <- val2rank(X, opt)

}
\author{
Fabrice Zaoui
}
