sort_val_labels | R Documentation |
Sort value labels according to values or to labels
sort_val_labels(x, according_to = c("values", "labels"), decreasing = FALSE)
x |
A labelled vector or a data.frame |
according_to |
According to values or to labels? |
decreasing |
In decreasing order? |
v <- labelled(c(1, 2, 3), c(maybe = 2, yes = 1, no = 3))
v
sort_val_labels(v)
sort_val_labels(v, decreasing = TRUE)
sort_val_labels(v, "l")
sort_val_labels(v, "l", TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.