R/plot_helpers.R
Plot a labelled vector, making use of the variable name, label and value labels to make the plot more readable. This function also works for other vectors, but provides little benefit.
plot_labelled(item, item_name = deparse(substitute(item)), wrap_at = 50, go_vertical = FALSE)
| item | a vector |
|---|---|
| item_name | item name, defaults to name of first argument |
| wrap_at | the subtitle (the label) will be wrapped at this number of characters |
| go_vertical | defaults to FALSE. Whether to show choices on the Y axis instead. |
data("bfi", package = "codebook") plot_labelled(bfi$BFIK_open_1)