qvector: Ordinal Transformation of a Vector

Description Usage Arguments Value Author(s) References See Also Examples

Description

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

Usage

1
qvector(x, probs = seq(0, 1, 0.25), na.rm = FALSE, ...)

Arguments

x

a numeric vector.

probs

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

na.rm

logical, if true, any NA and NaNs are removed from x before the quantiles are computed.

...

further arguments passed to the function quantile.

Value

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

Author(s)

P\'eter S\'olymos, solymos@ualberta.ca

References

S\'olymos P. (2008) mefa: an R package for handling and reporting count data. Community Ecology 9, 125–127.

S\'olymos P. (2009) Processing ecological data in R with the mefa package. Journal of Statistical Software 29(8), 1–28. doi: 10.18637/jss.v029.i08

http://mefa.r-forge.r-project.org/

See Also

quantile

Examples

1
2
3
4
5
6
x <- rnorm(20)
x
y <- qvector(x)
y
rbind(x, y)
plot(x, y, type="h")

psolymos/mefa documentation built on Oct. 10, 2021, 6:22 p.m.