R - abbreviate strings with abbreviate()

25 Dec 2018

Abbreviate strings to at least minlength characters with abbreviate

abbreviate(month.name, minlength = 3)
##   January  February     March     April       May      June      July 
##     "Jnr"     "Fbr"     "Mrc"     "Apr"     "May"     "Jun"     "Jly" 
##    August September   October  November  December 
##     "Ags"     "Spt"     "Oct"     "Nvm"     "Dcm"
[ R  function  string  ]