labels <- c("VeryLongStateName", "Short", "AnotherLongName")
# No abbreviation
abbrev_label(labels, NULL)
# Fixed max length
abbrev_label(labels, 5) # "Very...", "Short", "Anot..."
# Auto-adaptive
abbrev_label(labels, "auto")
Run the code above in your browser using DataLab