ranking | R Documentation |
Creates a ranking object.
ranking(x, domain = NULL, decreasing = TRUE, complete = FALSE) as.ranking(x, ...) is.ranking(x)
x |
For |
domain |
object coercible to a set, from which the labels usable
in |
decreasing |
logical indicating whether the ranking orders objects
from the best to the worst ( |
complete |
logical specifying whether missing values should be
imputed, if any. Missing elements are those from |
... |
currently not used. |
An object of class ranking
.
relation()
## simple rankings OBJECTS <- c("Apples", "Bananas", "Oranges", "Lemons") print(R <- ranking(OBJECTS)) ranking(OBJECTS[2:4], domain = OBJECTS) ranking(OBJECTS[2:4], domain = OBJECTS, complete = TRUE) ## ranking with ties (weak orders) ranking(list(c("PhD", "MD"), "MSc", c("BSc", "BA"))) ## ranking A > B ~ C with D missing: ranking(c(A = 1, B = 2, C = 2, D = NA)) ## coercion functions identical(as.ranking(as.relation(R)), R)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.