title: How to remove last n characters from every element in the R vector
body: <p>I am very new to R, and I could not find a simple example online of how to remove the last n characters from every element of a vector (array?) </p>
  
  <p>I come from a Java background, so what I would like to do is to iterate over every element of <code>a$data</code> and remove the last 3 characters from every element.</p>
  
  <p>How would you go about it?</p>