qdef {mefa}R Documentation

Numeric vector conversion based on quantiles

Description

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

Usage

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

Arguments

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

Value

A vector of length the same as the input vector, containing integers from 1 to length(probs)-1.

Author(s)

Peter Solymos, Solymos.Peter@aotk.szie.hu, http://www.univet.hu/users/psolymos/personal/

See Also

quantile

Examples

(vec <- rnorm(20))
(qd <- qdef(vec))
plot(vec, qd, type="h")

[Package mefa version 1.1-0 Index]