Learn R Programming

mefa (version 2.0-1)

qvector: Ordinal Transformation of a Vector

Description

Converts a numeric vector into an ordinal one based on quantiles.

Usage

qvector(x, probs = seq(0, 1, 0.25))

Arguments

x
a numeric vector.
probs
numeric vector of probabilities with values in [0, 1] used by quantile.

Value

  • A numeric vector of length the same as the input vector, containing the respective (upper) quantile values.

encoding

UTF-8

References

Sólymos{Solymos} P. 2008. mefa: an R package for handling and reporting count data. Community Ecology 9, 125--127. http://mefa.r-forge.r-project.org/

See Also

quantile

Examples

Run this code
x <- rnorm(20)
x
y <- qvector(x)
y
rbind(x, y)
plot(x, y, type="h")

Run the code above in your browser using DataLab