Skip to content

Instantly share code, notes, and snippets.

@ChandlerLutz
Last active January 30, 2024 14:53
Show Gist options
  • Save ChandlerLutz/cca06fb35003713efae87c0322ac193e to your computer and use it in GitHub Desktop.
Save ChandlerLutz/cca06fb35003713efae87c0322ac193e to your computer and use it in GitHub Desktop.
Dashes, hpyhens, en dashes, and em dashes in R
# For Plots in R, need to use unicode dashes
# https://jkorpela.fi/dashes.html
# https://stackoverflow.com/a/27492072/1317443
# soft hyphen: `\u00ad` (Note that on macOS using the `Cairo` package that you don't need this; just type "-" on your keyboard)
# en dash: `\u2013`
# em dash: `\u2014`
##e.g.
## soft hyphen
"Expected Fed Funds Rate in 6\u00admonths"
## en dash
"Expected Fed Funds Rate in 6\u2013months"
##em dash
"Expected Fed Funds Rate in 6\u2014months"
@bathyscapher
Copy link

Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment