continuous2ordinal | R Documentation |
Discretize continuous x to ordinal z with k
levels. If the generated values are guaranteed to have k
unique levels, otherwise, error will be raised.
continuous2ordinal(x, k = 2, by = "dist", qmin = 0.1, qmax = 0.9, max_try = 20)
x |
continuous vector |
k |
number of ordinal levels. Generated ordinal vector takes value from |
by |
Select cut points by absolute values if 'dist' and by quantiles if 'quantile' |
qmin |
Cutoff points are slected in the range of 'qmin' and 'qmax' quantiles of the data 'x' |
qmax |
See 'qmin'. |
max_try |
The maximum number of attempts to select random cutoffs, since some may yield to ordinal variable with fewer than |
an ordinal vector.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.