title: Truncate character strings after first N characters
body: <p>I have a vector of strings that range from 3 characters to 59 characters. I am trying to truncate any string greater than 13 characters with "..." after 10 characters. For example if </p>
  
  <pre><code>a &lt;- c("AMS", "CCD", "TCGGCKGTPGPHOLKP", "NOK", "THIS IS A LONG STRING", "JSQU909LPPLU")
  </code></pre>
  
  <p>Then I want to get</p>
  
  <pre><code>"AMS"   "CCD"   "TCGGCKGTPG..."   "NOK"   "THIS IS A ..."   "JSQU909LPPLU"
  </code></pre>
  
  <p>I am sure it is going to require an <code>if</code> statement and a <code>gsub</code> and my issue is the <code>gsub</code>. Any thoughts?</p>