sort.assoc_scores {mclm} | R Documentation |
Sort an 'assoc_scores' object
Description
Sort a full object of class assoc_scores
based on some criterion. It's the
same that print
does but with a bit more flexibility.
Usage
## S3 method for class 'assoc_scores'
sort(x, decreasing = TRUE, sort_order = "none", ...)
Arguments
x |
Object of class |
decreasing |
Boolean value. If If For any other column, |
sort_order |
Criterion to order the rows. Possible values
are |
... |
Additional arguments. |
Value
An object of class assoc_scores
.
Examples
a <- c(10, 30, 15, 1)
b <- c(200, 1000, 5000, 300)
c <- c(100, 14, 16, 4)
d <- c(300, 5000, 10000, 6000)
types <- c("four", "fictitious", "toy", "examples")
(scores <- assoc_abcd(a, b, c, d, types = types))
print(scores, sort_order = "PMI")
sorted_scores <- sort(scores, sort_order = "PMI")
sorted_scores
sort(scores, decreasing = FALSE, sort_order = "PMI")